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
This commit is contained in:
Jonas Ådahl 2017-07-21 15:09:07 +08:00
parent 7e1f65405f
commit 8b23dd915f

View File

@ -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);
}