From: Ray Wang <raywang@linux.vnet.ibm.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target_sparc: Fix use of free() instead of g_free()
Date: Mon, 17 Oct 2011 15:17:34 +0800 [thread overview]
Message-ID: <4E9BD68E.2090304@linux.vnet.ibm.com> (raw)
In-Reply-To: <1318788646-29069-1-git-send-email-sw@weilnetz.de>
On 10/17/2011 02:10 AM, Stefan Weil wrote:
> This error was reported by cppcheck.
>
> Signed-off-by: Stefan Weil<sw@weilnetz.de>
> ---
> 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<raywang@linux.vnet.ibm.com>
--
Regards,
Ray Wang
prev parent reply other threads:[~2011-10-17 7:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-16 18:10 [Qemu-devel] [PATCH] target_sparc: Fix use of free() instead of g_free() Stefan Weil
2011-10-17 7:17 ` Ray Wang [this message]
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=4E9BD68E.2090304@linux.vnet.ibm.com \
--to=raywang@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sw@weilnetz.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).