From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Anthony Liguori" <aliguori@us.ibm.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH 8/8] target-arm: Fix use of free() in cpu_arm_close()
Date: Thu, 20 Oct 2011 15:36:08 +0100 [thread overview]
Message-ID: <1319121368-2899-2-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1319121368-2899-1-git-send-email-peter.maydell@linaro.org>
From: Andreas Färber <afaerber@suse.de>
env is allocated in cpu_arm_init() with g_malloc0(), so free with g_free().
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target-arm/helper.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/target-arm/helper.c b/target-arm/helper.c
index eddb923..97af4d0 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -475,7 +475,7 @@ static uint32_t cpu_arm_find_by_name(const char *name)
void cpu_arm_close(CPUARMState *env)
{
- free(env);
+ g_free(env);
}
uint32_t cpsr_read(CPUARMState *env)
--
1.7.1
next prev parent reply other threads:[~2011-10-20 14:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-20 14:36 [Qemu-devel] [PULL v2 0/8] target-arm queue Peter Maydell
2011-10-20 14:36 ` Peter Maydell [this message]
2011-10-26 23:13 ` andrzej zaborowski
2011-10-26 23:25 ` Peter Maydell
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=1319121368-2899-2-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--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 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).