[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/5] ui: Replacing pointer in function
|
From: |
marcandre . lureau |
|
Subject: |
[PULL 5/5] ui: Replacing pointer in function |
|
Date: |
Tue, 7 Nov 2023 13:30:35 +0400 |
From: Sergey Mironov <mironov@fintech.ru>
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 <sdl.qemu@linuxtesting.org>
Signed-off-by: Sergey Mironov <mironov@fintech.ru>
Message-ID: <20231012104448.1251039-1-mironov@fintech.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
ui/gtk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.41.0
- [PULL 0/5] Ui patches, marcandre . lureau, 2023/11/07
- [PULL 1/5] ui/gtk: force realization of drawing area, marcandre . lureau, 2023/11/07
- [PULL 4/5] ui/cocoa: add zoom-to-fit display option, marcandre . lureau, 2023/11/07
- [PULL 3/5] ui/gtk-egl: apply scale factor when calculating window's dimension, marcandre . lureau, 2023/11/07
- [PULL 2/5] ui/gtk-egl: Check EGLSurface before doing scanout, marcandre . lureau, 2023/11/07
- [PULL 5/5] ui: Replacing pointer in function,
marcandre . lureau <=
- Re: [PULL 0/5] Ui patches, Stefan Hajnoczi, 2023/11/07
- Re: [PULL 0/5] Ui patches, Michael Tokarev, 2023/11/07
- [PULL 0/5] Ui patches, marcandre . lureau, 2023/11/21
- [PULL 1/5] vl: revert behaviour for -display none, marcandre . lureau, 2023/11/21
- [PULL 2/5] ui: use "vc" chardev for dbus, gtk & spice-app, marcandre . lureau, 2023/11/21
- [PULL 3/5] ui/console: fix default VC when there are no display, marcandre . lureau, 2023/11/21
- [PULL 4/5] vl: add missing display_remote++, marcandre . lureau, 2023/11/21
- [PULL 5/5] ui/pixman-minimal.h: fix empty allocation, marcandre . lureau, 2023/11/21
- Re: [PULL 0/5] Ui patches, Stefan Hajnoczi, 2023/11/21