[Top][All Lists]

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

Re: [Qemu-arm] [Qemu-devel] [PATCH 5/5] target/arm: Create timers in rea

From: Richard Henderson
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH 5/5] target/arm: Create timers in realize, not init
Date: Tue, 4 Dec 2018 08:01:11 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

On 12/4/18 7:29 AM, Peter Maydell wrote:
> The timer_new() function allocates memory; this means that
> if we call it in the CPU's init method we would need
> to provide an instance_finalize method to free it. Defer
> the timer creation to the realize function instead.
> This fixes a memory leak spotted by clang LeakSanitizer
> when a CPU object is created for introspection.
> Signed-off-by: Peter Maydell <address@hidden>
> ---
>  target/arm/cpu.c | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)

Reviewed-by: Richard Henderson <address@hidden>


reply via email to

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