]> git.ipfire.org Git - thirdparty/qemu.git/commit
ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context()
authorPan Nengyuan <pannengyuan@huawei.com>
Mon, 31 Aug 2020 13:43:10 +0000 (09:43 -0400)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 4 Sep 2020 05:30:57 +0000 (07:30 +0200)
commit2cd1e3f91582efbee497a0069f6cbe19f324f0b3
tree6f031c47f05bd558c7fdd0990e424ca4923e3bff
parent67a7bfe560a1bba59efab085cb3430f45176d382
ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context()

Receiving error in local variable err, and forgot to free it.
This patch check the return value of 'gdk_window_create_gl_context'
and 'gdk_gl_context_realize', then free err to fix it.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Message-Id: <20200831134315.1221-6-pannengyuan@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/gtk-gl-area.c