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 <ppaalanen@gmail.com>
This commit is contained in:
Pekka Paalanen 2012-12-04 16:01:15 +02:00 committed by Kristian Høgsberg
parent 81ee3f50c3
commit aac1c13332
3 changed files with 3 additions and 0 deletions

View File

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

View File

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

View File

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