From 8a0f9b5263bb3a96d574ca78ad3b8f1d7bf8b12b Mon Sep 17 00:00:00 2001 From: zhanghailiang Date: Fri, 14 Nov 2014 11:25:28 +0800 Subject: gtk: fix possible memory leak about local_err local_err in gd_vc_gfx_init() is not freed, and we don't use it, so remove it. Signed-off-by: zhanghailiang Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 38bf463392..9496b8d24f 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 { -- cgit v1.2.3