Re: [PATCH 15/17] semihosting: fix memleak at semihosting_arg_fallback

2023-10-28 Thread Richard Henderson
On 10/28/23 03:33, Alex Bennée wrote: From: Matheus Tavares Bernardino We duplicate "cmd" as strtok may modify its argument, but we forgot to free it later. Furthermore, add_semihosting_arg doesn't take responsibility for this memory either (it strdup's the argument). Signed-off-by: Matheus Ta

[PATCH 15/17] semihosting: fix memleak at semihosting_arg_fallback

2023-10-28 Thread Alex Bennée
From: Matheus Tavares Bernardino We duplicate "cmd" as strtok may modify its argument, but we forgot to free it later. Furthermore, add_semihosting_arg doesn't take responsibility for this memory either (it strdup's the argument). Signed-off-by: Matheus Tavares Bernardino Reviewed-by: Philippe