diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-12-13 14:43:48 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-12-13 15:32:43 +0100 |
commit | 2a58453e25899e726f02db005de0e1296c326845 (patch) | |
tree | 35ec150d0a9aa04b0645303ecdf4e52a3601c050 /src/egl/drivers/dri2/platform_wayland.c | |
parent | cbd65fe14917def9c0f401c973394d6456cbe83b (diff) | |
download | external_mesa3d-2a58453e25899e726f02db005de0e1296c326845.zip external_mesa3d-2a58453e25899e726f02db005de0e1296c326845.tar.gz external_mesa3d-2a58453e25899e726f02db005de0e1296c326845.tar.bz2 |
egl_dri2: Fix some valgrind reported leaks
Free the device_name, reported by Pekka Paalanen.
Destroy wayland display and drm resources,
if created by dri2_initialize_wayland.
Diffstat (limited to 'src/egl/drivers/dri2/platform_wayland.c')
-rw-r--r-- | src/egl/drivers/dri2/platform_wayland.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 7a70d8d..16c613f 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -731,6 +731,10 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp) close(dri2_dpy->fd); dlclose(dri2_dpy->driver); free(dri2_dpy->driver_name); + free(dri2_dpy->device_name); + wl_drm_destroy(dri2_dpy->wl_drm); + if (dri2_dpy->own_device) + wl_display_destroy(dri2_dpy->wl_dpy); free(dri2_dpy); disp->DriverData = NULL; @@ -819,6 +823,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp) dri2_dpy->wl_dpy = wl_display_connect(NULL); if (dri2_dpy->wl_dpy == NULL) goto cleanup_dpy; + dri2_dpy->own_device = 1; } else { dri2_dpy->wl_dpy = disp->PlatformDisplay; } |