From: Stefan Weil <sw@weilnetz.de>
To: qemu-devel@nongnu.org
Cc: Stefan Weil <sw@weilnetz.de>, Anthony Liguori <aliguori@us.ibm.com>
Subject: [Qemu-devel] [PATCH 3/6] qdev: Fix memory leak in function set_pci_devfn
Date: Thu, 3 May 2012 07:14:50 +0200 [thread overview]
Message-ID: <1336022093-21467-4-git-send-email-sw@weilnetz.de> (raw)
In-Reply-To: <1336022093-21467-1-git-send-email-sw@weilnetz.de>
Valgrind reported this memory leak which occured very often.
Test scenario:
qemu-system-i386 (no arguments), only BIOS started, terminate with
monitor command (quit).
v2:
Use error_free instead of g_free (hint from Andreas Färber, thanks).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Acked-by: Andreas Färber <afaerber@suse.de>
---
hw/qdev-properties.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index 98dd06a..c5545dc 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -834,6 +834,7 @@ static void set_pci_devfn(Object *obj, Visitor *v, void *opaque,
visit_type_str(v, &str, name, &local_err);
if (local_err) {
+ error_free(local_err);
return set_int32(obj, v, opaque, name, errp);
}
--
1.7.9
next prev parent reply other threads:[~2012-05-03 5:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 5:14 [Qemu-devel] [PULL 1.1 0/6] Missing patches for QEMU 1.1 Stefan Weil
2012-05-03 5:14 ` [Qemu-devel] [PATCH 1/6] target-mips: Remove unused inline function Stefan Weil
2012-05-03 5:14 ` [Qemu-devel] [PATCH 2/6] arm-semi: Rename SYS_XXX macros to TARGET_SYS_XXX (fixes compiler warning) Stefan Weil
2012-05-03 5:14 ` Stefan Weil [this message]
2012-05-03 5:14 ` [Qemu-devel] [PATCH 4/6] hw/pc_sysfw: Fix memory leak Stefan Weil
2012-05-03 5:14 ` [Qemu-devel] [PATCH 5/6] qom: Fix memory leak in function container_get Stefan Weil
2012-05-03 5:14 ` [Qemu-devel] [PATCH 6/6] qemu-timer: Fix limits for w32 mmtimer Stefan Weil
2012-05-08 16:10 ` [Qemu-devel] [PULL 1.1 0/6] Missing patches for QEMU 1.1 Anthony Liguori
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=1336022093-21467-4-git-send-email-sw@weilnetz.de \
--to=sw@weilnetz.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).