[mutter] cursor-renderer-native: Don't leak cursor gbm buffers



commit 8b23dd915f4da70f4a65e2caa779b90bf25e2fe8
Author: Jonas Ådahl <jadahl gmail com>
Date:   Fri Jul 21 15:09:07 2017 +0800

    cursor-renderer-native: Don't leak cursor gbm buffers
    
    We tried to free all three cursors by looping, but only ever tried to
    free the first buffer.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=785381

 src/backends/native/meta-cursor-renderer-native.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/backends/native/meta-cursor-renderer-native.c 
b/src/backends/native/meta-cursor-renderer-native.c
index efd9b73..4ce7592 100644
--- a/src/backends/native/meta-cursor-renderer-native.c
+++ b/src/backends/native/meta-cursor-renderer-native.c
@@ -605,7 +605,7 @@ cursor_priv_free (gpointer data)
     return;
 
   for (i = 0; i < HW_CURSOR_BUFFER_COUNT; i++)
-    g_clear_pointer (&cursor_priv->bos[0], (GDestroyNotify) gbm_bo_destroy);
+    g_clear_pointer (&cursor_priv->bos[i], (GDestroyNotify) gbm_bo_destroy);
   g_slice_free (MetaCursorNativePrivate, cursor_priv);
 }
 


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