@@ -142,15 +142,14 @@ QEMUGLContext gd_gl_area_create_context(DisplayChangeListener *dcl,
VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
GdkWindow *window;
GdkGLContext *ctx;
- GError *err = NULL;
gtk_gl_area_make_current(GTK_GL_AREA(vc->gfx.drawing_area));
window = gtk_widget_get_window(vc->gfx.drawing_area);
- ctx = gdk_window_create_gl_context(window, &err);
+ ctx = gdk_window_create_gl_context(window, NULL);
gdk_gl_context_set_required_version(ctx,
params->major_ver,
params->minor_ver);
- gdk_gl_context_realize(ctx, &err);
+ gdk_gl_context_realize(ctx, NULL);
return ctx;
}
Receiving error in local variable err, and forgot to free it. Considering that there is no place to deal with it. Clean up. Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com> --- Cc: Gerd Hoffmann <kraxel@redhat.com> --- ui/gtk-gl-area.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)