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>
dev->dumb[i] = NULL;
}
+ if (dev->watch) eeze_udev_watch_del(dev->watch);
+
/* free crtcs */
if (dev->crtcs) free(dev->crtcs);
/* 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);