From fb93569e422d4f4b5953dd953c92ba7838309972 Mon Sep 17 00:00:00 2001 From: Sergey Mironov Date: Thu, 12 Oct 2023 13:44:48 +0300 Subject: ui: Replacing pointer in function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At the end of the first if we see 'vc->gfx.surface = NULL;', further checking of it is pointless. In the second if, ectx is taken. Found by Linux Verification Center (linuxtesting.org) with SVACE. Co-developed-by: Linux Verification Center Signed-off-by: Sergey Mironov Message-ID: <20231012104448.1251039-1-mironov@fintech.ru> Reviewed-by: Marc-André Lureau --- ui/gtk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/gtk.c b/ui/gtk.c index 2a4c9b84ba..be047a41ad 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1400,7 +1400,7 @@ static void gd_menu_untabify(GtkMenuItem *item, void *opaque) eglDestroySurface(qemu_egl_display, vc->gfx.esurface); vc->gfx.esurface = NULL; } - if (vc->gfx.esurface) { + if (vc->gfx.ectx) { eglDestroyContext(qemu_egl_display, vc->gfx.ectx); vc->gfx.ectx = NULL; } -- cgit v1.2.3