qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/1] ui: Replacing pointer in function


From: Marc-André Lureau
Subject: Re: [PATCH 1/1] ui: Replacing pointer in function
Date: Mon, 16 Oct 2023 16:23:42 +0400

On Thu, Oct 12, 2023 at 2:46 PM Sergey Mironov <mironov@fintech.ru> wrote:
>
> 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>

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 935de1209b..5da3f9b022 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.31.1
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]