Commit 8a0f9b52 authored by zhanghailiang's avatar zhanghailiang Committed by Gerd Hoffmann

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: 's avatarzhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: 's avatarGerd Hoffmann <kraxel@redhat.com>
parent 9c7074da
...@@ -1666,10 +1666,9 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc, ...@@ -1666,10 +1666,9 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
QemuConsole *con, int idx, QemuConsole *con, int idx,
GSList *group, GtkWidget *view_menu) GSList *group, GtkWidget *view_menu)
{ {
Error *local_err = NULL;
Object *obj; Object *obj;
obj = object_property_get_link(OBJECT(con), "device", &local_err); obj = object_property_get_link(OBJECT(con), "device", NULL);
if (obj) { if (obj) {
vc->label = g_strdup_printf("%s", object_get_typename(obj)); vc->label = g_strdup_printf("%s", object_get_typename(obj));
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment