qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Richard Henderson
Subject: Re: [PATCH 15/17] semihosting: fix memleak at semihosting_arg_fallback
Date: Sat, 28 Oct 2023 12:31:51 -0700
User-agent: Mozilla Thunderbird

On 10/28/23 03:33, Alex Bennée wrote:
From: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>

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>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
  semihosting/config.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]