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



commit dabc17ef04efa3e1d140fd9900d527b9d518d259
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 f6aab6b30..8c324386f 100644
--- a/cogl/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/cogl/winsys/cogl-winsys-egl.c
@@ -697,7 +697,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]