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>
Pekka Paalanen 12 years ago committed by Kristian Høgsberg
parent 81ee3f50c3
commit aac1c13332
  1. 1
      clients/simple-egl.c
  2. 1
      clients/simple-shm.c
  3. 1
      clients/window.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);

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

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

Loading…
Cancel
Save