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:
parent
81ee3f50c3
commit
aac1c13332
@ -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…
Reference in New Issue
Block a user