qemu-e2k/semihosting
Matheus Tavares Bernardino 2eb71a0c20 semihosting: fix memleak at semihosting_arg_fallback
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 <quic_mathbern@quicinc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <03d81c56bfc3d08224e4106efca5949d8894cfa5.1697801632.git.quic_mathbern@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231029145033.592566-18-alex.bennee@linaro.org>
2023-10-31 14:10:21 +00:00
..
arm-compat-semi.c * util/log: re-allow switching away from stderr log file 2023-10-09 10:11:18 -04:00
config.c semihosting: fix memleak at semihosting_arg_fallback 2023-10-31 14:10:21 +00:00
console.c cleanup: Tweak and re-run return_directly.cocci 2022-12-14 16:19:35 +01:00
guestfd.c semihosting: Rename softmmu_FOO_user() -> uaccess_FOO_user() 2023-10-07 19:02:59 +02:00
Kconfig semihosting: Move hw/semihosting/ -> semihosting/ 2021-03-10 15:34:12 +00:00
meson.build meson: Replace CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY 2023-06-20 10:01:30 +02:00
syscalls.c semihosting: Rename softmmu_FOO_user() -> uaccess_FOO_user() 2023-10-07 19:02:59 +02:00
uaccess.c semihosting: Rename softmmu_FOO_user() -> uaccess_FOO_user() 2023-10-07 19:02:59 +02:00