From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPfFH-0006gp-91 for qemu-devel@nongnu.org; Mon, 17 Mar 2014 17:39:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPfF8-0005pG-53 for qemu-devel@nongnu.org; Mon, 17 Mar 2014 17:38:55 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40176 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPfF7-0005o8-Sv for qemu-devel@nongnu.org; Mon, 17 Mar 2014 17:38:46 -0400 Message-ID: <53276B64.4040208@suse.de> Date: Mon, 17 Mar 2014 22:38:44 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <5327618D.5070007@de.ibm.com> <5327691D.3040906@de.ibm.com> In-Reply-To: <5327691D.3040906@de.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] small memory leak due to MachineClass rework List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: Peter Maydell , "Michael S. Tsirkin" , "qemu-devel@nongnu.org" , Marcel Apfelbaum 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 = 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). >=20 > Ok, if you dont have a problem with that approach, I can submit a prope= r > 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 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg