From: Marc-André Lureau <[email protected]>
cursor_fb is a local egl_fb that gets an FBO allocated via
egl_fb_setup_for_tex but is never destroyed, leaking the
framebuffer object on every cursor update.
Add egl_fb_destroy() after the cursor data has been read.
Fixes: commit 142ca628a7 ("ui: add a D-Bus display backend")
Signed-off-by: Marc-André Lureau <[email protected]>
---
ui/dbus-listener.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c
index 3e2b4adf41f..fff7cf83274 100644
--- a/ui/dbus-listener.c
+++ b/ui/dbus-listener.c
@@ -660,6 +660,7 @@ static void dbus_cursor_dmabuf(DisplayChangeListener *dcl,
egl_fb_setup_for_tex(&cursor_fb, width, height, texture, false);
ds = qemu_create_displaysurface(width, height);
egl_fb_read(ds, &cursor_fb);
+ egl_fb_destroy(&cursor_fb);
v_data = g_variant_new_from_data(
G_VARIANT_TYPE("ay"),
--
2.53.0