From aac1c1333213afd678bb1b1390db43670507c19c Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 4 Dec 2012 16:01:15 +0200 Subject: [PATCH] clients: destroy wl_registry on exit Plug an insignificant memory leak in demo programs that bother to clean up at all. Signed-off-by: Pekka Paalanen --- clients/simple-egl.c | 1 + clients/simple-shm.c | 1 + clients/window.c | 1 + 3 files changed, 3 insertions(+) diff --git a/clients/simple-egl.c b/clients/simple-egl.c index 12bc93d3..c073330a 100644 --- a/clients/simple-egl.c +++ b/clients/simple-egl.c @@ -676,6 +676,7 @@ main(int argc, char **argv) if (display.compositor) wl_compositor_destroy(display.compositor); + wl_registry_destroy(display.registry); wl_display_flush(display.display); wl_display_disconnect(display.display); diff --git a/clients/simple-shm.c b/clients/simple-shm.c index 5bc26bf7..831f9a40 100644 --- a/clients/simple-shm.c +++ b/clients/simple-shm.c @@ -369,6 +369,7 @@ destroy_display(struct display *display) if (display->compositor) wl_compositor_destroy(display->compositor); + wl_registry_destroy(display->registry); wl_display_flush(display->display); wl_display_disconnect(display->display); free(display); diff --git a/clients/window.c b/clients/window.c index 20d09d5a..c7767aee 100644 --- a/clients/window.c +++ b/clients/window.c @@ -4314,6 +4314,7 @@ display_destroy(struct display *display) wl_data_device_manager_destroy(display->data_device_manager); wl_compositor_destroy(display->compositor); + wl_registry_destroy(display->registry); close(display->epoll_fd);