Plug an insignificant memory leak in demo programs that bother to clean
up at all.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
if (display.compositor)
wl_compositor_destroy(display.compositor);
+ wl_registry_destroy(display.registry);
wl_display_flush(display.display);
wl_display_disconnect(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);
wl_data_device_manager_destroy(display->data_device_manager);
wl_compositor_destroy(display->compositor);
+ wl_registry_destroy(display->registry);
close(display->epoll_fd);