aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-01-21 11:32:53 -0500
committerChris Michael <cpmichael@osg.samsung.com>2016-01-21 11:32:53 -0500
commit4ba349be4f6706d6049d54e1f60f2716c41edec5 (patch)
tree8acb19233bb151337af6bce20274564f6482c2a5 /src/lib/ecore_drm
parentecore-drm: Refactor logind code to use tty functions (diff)
downloadefl-4ba349be4f6706d6049d54e1f60f2716c41edec5.tar.gz
ecore-drm: Destroy any existing eeze watch when we free the device
If a user frees a device without closing it we could end up with a dangling eeze watch. This small patch just makes sure to delete the watch if it exists @fix Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_device.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_device.c b/src/lib/ecore_drm/ecore_drm_device.c
index a406d5e1ff..cca3332124 100644
--- a/src/lib/ecore_drm/ecore_drm_device.c
+++ b/src/lib/ecore_drm/ecore_drm_device.c
@@ -277,6 +277,8 @@ ecore_drm_device_free(Ecore_Drm_Device *dev)
dev->dumb[i] = NULL;
}
+ if (dev->watch) eeze_udev_watch_del(dev->watch);
+
/* free crtcs */
if (dev->crtcs) free(dev->crtcs);
@@ -394,9 +396,11 @@ ecore_drm_device_close(Ecore_Drm_Device *dev)
/* delete udev watch */
if (dev->watch) eeze_udev_watch_del(dev->watch);
+ dev->watch = NULL;
/* close xkb context */
if (dev->xkb_ctx) xkb_context_unref(dev->xkb_ctx);
+ dev->xkb_ctx = NULL;
_ecore_drm_launcher_device_close(dev->drm.name, dev->drm.fd);