summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2013-10-16 15:04:03 +0300
committerKristian Høgsberg <krh@bitplanet.net>2013-10-22 14:57:03 -0700
commit98b359bd1b469af3b025a8fab5446aac8ce4c727 (patch)
treebaf9b5505f087475e3fe2a4df95056dedced5f90 /src
parentdafa97fed9c99e0d0c783d913717229378b575da (diff)
wayland: Don't leak wl_drm global when unbinding display
Diffstat (limited to 'src')
-rw-r--r--src/egl/wayland/wayland-drm/wayland-drm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wayland-drm/wayland-drm.c
index 06bd18cf461..2f5acb217d1 100644
--- a/src/egl/wayland/wayland-drm/wayland-drm.c
+++ b/src/egl/wayland/wayland-drm/wayland-drm.c
@@ -41,6 +41,7 @@
struct wl_drm {
struct wl_display *display;
+ struct wl_global *wl_drm_global;
void *user_data;
char *device_name;
@@ -275,7 +276,9 @@ wayland_drm_init(struct wl_display *display, char *device_name,
drm->buffer_interface.destroy = buffer_destroy;
- wl_global_create(display, &wl_drm_interface, 2, drm, bind_drm);
+ drm->wl_drm_global =
+ wl_global_create(display, &wl_drm_interface, 2,
+ drm, bind_drm);
return drm;
}
@@ -285,7 +288,7 @@ wayland_drm_uninit(struct wl_drm *drm)
{
free(drm->device_name);
- /* FIXME: need wl_display_del_{object,global} */
+ wl_global_destroy(drm->wl_drm_global);
free(drm);
}