From: "Andreas Färber" <afaerber@suse.de>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Marcel Apfelbaum <marcel.a@redhat.com>
Subject: Re: [Qemu-devel] small memory leak due to MachineClass rework
Date: Mon, 17 Mar 2014 22:38:44 +0100 [thread overview]
Message-ID: <53276B64.4040208@suse.de> (raw)
In-Reply-To: <5327691D.3040906@de.ibm.com>
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 <borntraeger@de.ibm.com> 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
next prev parent reply other threads:[~2014-03-17 21:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 20:56 [Qemu-devel] small memory leak due to MachineClass rework Christian Borntraeger
2014-03-17 21:25 ` Peter Maydell
2014-03-17 21:29 ` Christian Borntraeger
2014-03-17 21:38 ` Andreas Färber [this message]
2014-03-17 21:43 ` Marcel Apfelbaum
2014-03-18 14:57 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53276B64.4040208@suse.de \
--to=afaerber@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=marcel.a@redhat.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.