[Top][All Lists]

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH] target_sparc: Fix use of free()

From: Ray Wang
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] target_sparc: Fix use of free() instead of g_free()
Date: Mon, 17 Oct 2011 15:17:34 +0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20110617 Thunderbird/3.1.11

On 10/17/2011 02:10 AM, Stefan Weil wrote:
This error was reported by cppcheck.

Signed-off-by: Stefan Weil<address@hidden>
  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<address@hidden>


Ray Wang

reply via email to

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