mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
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>
This commit is contained in:
committed by
Stefan Roese
parent
0786dd573d
commit
3a11eada38
@@ -31,7 +31,7 @@
|
||||
struct cyclic_info {
|
||||
void (*func)(void *ctx);
|
||||
void *ctx;
|
||||
char *name;
|
||||
const char *name;
|
||||
uint64_t delay_us;
|
||||
uint64_t start_time_us;
|
||||
uint64_t cpu_time_us;
|
||||
|
||||
Reference in New Issue
Block a user