qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] hw/arm/collie: Put StrongARMState* into a CollieMachineState


From: Peter Maydell
Subject: Re: [PATCH] hw/arm/collie: Put StrongARMState* into a CollieMachineState struct
Date: Thu, 26 Mar 2020 20:47:48 +0000

On Thu, 26 Mar 2020 at 20:34, Peter Maydell <address@hidden> wrote:
>
> Coverity complains that the collie_init() function leaks the memory
> allocated in sa1110_init().  This is true but not significant since
> the function is called only once on machine init and the memory must
> remain in existence until QEMU exits anyway.
>
> Still, we can avoid the technical memory leak by keeping the pointer
> to the StrongARMState inside the machine state struct.  Switch from
> the simple DEFINE_MACHINE() style to defining a subclass of
> TYPE_MACHINE which extends the MachineState struct, and keep the
> pointer there.
>
> Fixes: CID 1421921
> Signed-off-by: Peter Maydell <address@hidden>

Rats, sent this out and immediately noticed I'd forgotten
to commit a change. v2 coming up...

-- PMM



reply via email to

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