From: zhanghailiang <zhang.zhanghailiang@huawei.com>
To: qemu-trivial@nongnu.org
Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>,
peter.huangpeng@huawei.com, kraxel@redhat.com,
qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] gtk: fix possible memory leak about local_err
Date: Fri, 14 Nov 2014 11:25:28 +0800 [thread overview]
Message-ID: <1415935528-11792-1-git-send-email-zhang.zhanghailiang@huawei.com> (raw)
local_err in gd_vc_gfx_init() is not freed, and we don't use it,
so remove it.
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
---
ui/gtk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index 38bf463..9496b8d 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1666,10 +1666,9 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
QemuConsole *con, int idx,
GSList *group, GtkWidget *view_menu)
{
- Error *local_err = NULL;
Object *obj;
- obj = object_property_get_link(OBJECT(con), "device", &local_err);
+ obj = object_property_get_link(OBJECT(con), "device", NULL);
if (obj) {
vc->label = g_strdup_printf("%s", object_get_typename(obj));
} else {
--
1.7.12.4
next reply other threads:[~2014-11-14 3:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 3:25 zhanghailiang [this message]
2014-11-14 8:29 ` [Qemu-devel] [PATCH] gtk: fix possible memory leak about local_err Gerd Hoffmann
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=1415935528-11792-1-git-send-email-zhang.zhanghailiang@huawei.com \
--to=zhang.zhanghailiang@huawei.com \
--cc=kraxel@redhat.com \
--cc=peter.huangpeng@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).