summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-06-21 10:44:37 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-06-21 10:44:37 +0200
commitfb4b5a293abf02b86f3521f71e6291abad2d1401 (patch)
tree0602acf194d8801637d8584fae46a106f8a23539
parent282019a7df29d7f4ca4277a26faa2ffd641645a2 (diff)
compositor: Do not leak old client buffersfixes-2
-rw-r--r--compositor/compositor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/compositor/compositor.c b/compositor/compositor.c
index 255dd5f..bb4d56d 100644
--- a/compositor/compositor.c
+++ b/compositor/compositor.c
@@ -282,6 +282,8 @@ wlsc_buffer_attach(struct wl_buffer *buffer, struct wl_surface *surface)
wl_list_remove(&es->buffer_link);
wl_list_insert(surfaces_attached_to, &es->buffer_link);
} else {
+ if (es->image != EGL_NO_IMAGE_KHR)
+ ec->destroy_image(ec->display, es->image);
es->image = ec->create_image(ec->display, NULL,
EGL_WAYLAND_BUFFER_WL,
buffer, NULL);