All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pan Nengyuan <pannengyuan@huawei.com>
To: <qemu-devel@nongnu.org>
Cc: kuhn.chenqun@huawei.com, Gerd Hoffmann <kraxel@redhat.com>,
	Pan Nengyuan <pannengyuan@huawei.com>,
	zhang.zhanghailiang@huawei.com, euler.robot@huawei.com
Subject: [PATCH 06/12] ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context()
Date: Fri, 14 Aug 2020 12:02:35 -0400	[thread overview]
Message-ID: <20200814160241.7915-7-pannengyuan@huawei.com> (raw)
In-Reply-To: <20200814160241.7915-1-pannengyuan@huawei.com>

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(-)

diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
index 85f9d14c51..c740a7eb14 100644
--- a/ui/gtk-gl-area.c
+++ b/ui/gtk-gl-area.c
@@ -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;
 }
 
-- 
2.18.2



  parent reply	other threads:[~2020-08-14 10:16 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 16:02 [PATCH 00/12] fix some error memleaks Pan Nengyuan
2020-08-14 16:02 ` [PATCH 01/12] qga/channel-posix: Plug memory leak in ga_channel_write_all() Pan Nengyuan
2020-08-26 11:57   ` Li Qiang
2020-08-14 16:02 ` [PATCH 02/12] hw/vfio/ap: Plug memleak in vfio_ap_get_group() Pan Nengyuan
2020-08-14  9:46   ` Pierre Morel
2020-08-17 16:11   ` Cornelia Huck
2020-08-26 11:03   ` Li Qiang
2020-08-26 11:41     ` Cornelia Huck
2020-08-26 11:53       ` Li Qiang
2020-08-14 16:02 ` [PATCH 03/12] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init Pan Nengyuan
2020-08-23 18:12   ` Viktor Prutyanov
2020-08-26 10:56   ` Li Qiang
2020-08-14 16:02 ` [PATCH 04/12] elf2dmp/pdb: Plug memleak in pdb_init_from_file Pan Nengyuan
2020-08-23 18:17   ` Viktor Prutyanov
2020-08-26 10:54   ` Li Qiang
2020-08-14 16:02 ` [PATCH 05/12] target/i386/sev: Plug memleak in sev_read_file_base64 Pan Nengyuan
2020-08-26 10:53   ` Li Qiang
2020-08-14 16:02 ` Pan Nengyuan [this message]
2020-08-26 12:20   ` [PATCH 06/12] ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context() Li Qiang
2020-08-27  7:06     ` Pan Nengyuan
2020-08-27 11:08       ` Li Qiang
2020-08-14 16:02 ` [PATCH 07/12] target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features Pan Nengyuan
2020-08-26 12:25   ` Li Qiang
2020-08-14 16:02 ` [PATCH 08/12] migration/colo: Plug memleaks in colo_process_incoming_thread Pan Nengyuan
2020-08-26 12:37   ` Li Qiang
2020-08-27  3:06     ` Pan Nengyuan
2020-08-14 16:02 ` [PATCH 09/12] blockdev: Fix a memleak in drive_backup_prepare() Pan Nengyuan
2020-08-17  9:41   ` Kevin Wolf
2020-08-26 10:45   ` Li Qiang
2020-08-14 16:02 ` [PATCH 10/12] block/file-posix: fix a possible undefined behavior Pan Nengyuan
2020-08-17  8:57   ` Stefano Garzarella
2020-08-17  9:38   ` Kevin Wolf
2020-08-26 10:40   ` Li Qiang
2020-08-14 16:02 ` [PATCH 11/12] vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string Pan Nengyuan
2020-08-26 10:37   ` Li Qiang
2020-08-14 16:02 ` [PATCH 12/12] test-util-sockets: Fix a memleak in test_socket_unix_abstract_good Pan Nengyuan
2020-08-14 14:50   ` Li Qiang
2020-08-15  3:10     ` Pan Nengyuan
2020-08-26  6:32 ` [PATCH 00/12] fix some error memleaks Pan Nengyuan

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=20200814160241.7915-7-pannengyuan@huawei.com \
    --to=pannengyuan@huawei.com \
    --cc=euler.robot@huawei.com \
    --cc=kraxel@redhat.com \
    --cc=kuhn.chenqun@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.