[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] small memory leak due to MachineClass rework
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] small memory leak due to MachineClass rework |
Date: |
Mon, 17 Mar 2014 22:38:44 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
Am 17.03.2014 22:29, schrieb Christian Borntraeger:
> On 17/03/14 22:25, Peter Maydell wrote:
>> On 17 March 2014 20:56, Christian Borntraeger <address@hidden> wrote:
>>> Turns out that valgrind is right. We simply forget the memory that
>>> g_strconcat has allocated.
>>> This fixes the small leak, but I have to cast away the constness of .name.
>>> Any better ideas?
>>
>> It's how cpu_register() in target-arm/cpu.c does the same thing
>> (though we use void* rather than gpointer as the cast).
>
> Ok, if you dont have a problem with that approach, I can submit a proper
> patch with signoff. Any preference regarding void * vs gpointer?
void *. We try to avoid g* types where possible/sensible.
Thanks for catching this!
Cheers,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg