]> git.dujemihanovic.xyz Git - u-boot.git/commit
cyclic: stop strdup'ing name in cyclic_register()
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Tue, 21 May 2024 08:46:50 +0000 (10:46 +0200)
committerStefan Roese <sr@denx.de>
Sun, 16 Jun 2024 10:13:38 +0000 (12:13 +0200)
commit3a11eada38efbbe1517662d196d11c2e20d2b5ca
tree76cd5910133c54834d15562e0addeda1cf969e02
parent0786dd573d0793417852e009dee3148ebdd163f3
cyclic: stop strdup'ing name in cyclic_register()

We are not checking the return value of strdup(), nor
freeing the string in cyclic_unregister().

However, all current users either pass a string literal or the
dev->name of the client device. So in all cases the name string will
live at least as long as the cyclic_info is registered, so just make
that a requirement.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
common/cyclic.c
include/cyclic.h