From 8b23dd915f4da70f4a65e2caa779b90bf25e2fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 21 Jul 2017 15:09:07 +0800 Subject: [PATCH] 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 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/native/meta-cursor-renderer-native.c b/src/backends/native/meta-cursor-renderer-native.c index efd9b7385..4ce7592b0 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); }