summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-09-25 12:04:23 -0400
committerChris Michael <cp.michael@samsung.com>2014-09-25 12:04:23 -0400
commit2bc462f55b2e0d0b4bee6998f91b611be4ee1d2d (patch)
treef2fdeb0fe88d604741b9d113b8d4dd807052dbcb
parent44e2cde623472fd0539e772f8fdc6fbb58f2b5a8 (diff)
ecore-drm: Don't crash if we get no devpath from Eeze
Summary: During a device remove event, we should check that Eeze has returned us a devpath to remove else we segfault when trying to strcmp the device path later during actual remove. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_drm/ecore_drm_inputs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_inputs.c b/src/lib/ecore_drm/ecore_drm_inputs.c
index 544c3b262c..e568ed3a35 100644
--- a/src/lib/ecore_drm/ecore_drm_inputs.c
+++ b/src/lib/ecore_drm/ecore_drm_inputs.c
@@ -228,9 +228,11 @@ _cb_input_event(const char *device, Eeze_Udev_Event event, void *data, Eeze_Udev
228 { 228 {
229 const char *node; 229 const char *node;
230 230
231 node = eeze_udev_syspath_get_devpath(device); 231 if ((node = eeze_udev_syspath_get_devpath(device)))
232 _device_remove(input, node); 232 {
233 eina_stringshare_del(node); 233 _device_remove(input, node);
234 eina_stringshare_del(node);
235 }
234 } 236 }
235 break; 237 break;
236 default: 238 default: