[mutter/wip/carlosg/fix-multimonitor-buffer-age: 5/5] cogl/egl: Explicitly initialize age variable



commit d47324e8d7d5e1d0fdb7919a86eb2ff274481405
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Oct 30 14:17:04 2019 +0100

    cogl/egl: Explicitly initialize age variable
    
    In case of error, it's untouched by EGL, which probably means an
    invalid read.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/906

 cogl/cogl/winsys/cogl-winsys-egl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/cogl/cogl/winsys/cogl-winsys-egl.c b/cogl/cogl/winsys/cogl-winsys-egl.c
index 6d795bbbe..5dd106d1b 100644
--- a/cogl/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/cogl/winsys/cogl-winsys-egl.c
@@ -699,7 +699,7 @@ _cogl_winsys_onscreen_get_buffer_age (CoglOnscreen *onscreen)
   CoglDisplayEGL *egl_display = context->display->winsys;
   EGLSurface surface = egl_onscreen->egl_surface;
   static gboolean warned = FALSE;
-  int age;
+  int age = 0;
 
   if (!(egl_renderer->private_features & COGL_EGL_WINSYS_FEATURE_BUFFER_AGE))
     return 0;


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