From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFhSi-00071U-3C for qemu-devel@nongnu.org; Mon, 17 Oct 2011 03:18:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFhSf-0006kI-OR for qemu-devel@nongnu.org; Mon, 17 Oct 2011 03:18:16 -0400 Message-ID: <4E9BD68E.2090304@linux.vnet.ibm.com> Date: Mon, 17 Oct 2011 15:17:34 +0800 From: Ray Wang MIME-Version: 1.0 References: <1318788646-29069-1-git-send-email-sw@weilnetz.de> In-Reply-To: <1318788646-29069-1-git-send-email-sw@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target_sparc: Fix use of free() instead of g_free() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org On 10/17/2011 02:10 AM, Stefan Weil wrote: > This error was reported by cppcheck. > > Signed-off-by: Stefan Weil > --- > target-sparc/helper.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target-sparc/helper.c b/target-sparc/helper.c > index c80531a..ca9bf6b 100644 > --- a/target-sparc/helper.c > +++ b/target-sparc/helper.c > @@ -1200,8 +1200,8 @@ static int cpu_sparc_register(CPUSPARCState *env, const char *cpu_model) > > static void cpu_sparc_close(CPUSPARCState *env) > { > - free(env->def); > - free(env); > + g_free(env->def); > + g_free(env); > } > > CPUSPARCState *cpu_sparc_init(const char *cpu_model) Reviewed-by: Ray Wang -- Regards, Ray Wang