summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-09-25 11:36:24 -0400
committerChris Michael <cp.michael@samsung.com>2014-09-25 11:36:24 -0400
commitb81cafcd7b026dbf56b5898a7578f15e1bab885c (patch)
tree2dbe321dc9b9629b1bd7f2ebfee4e333b54a1503
parentfc40591f1195da03766e0e97f3a6559648c80824 (diff)
ecore-drm: Fix adding an input device when we don't get the devpath
from Eeze. Summary: If we fail to get a devpath from Eeze for an input device, then we need to error out gracefully and not add a failed input device. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_drm/ecore_drm_inputs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_inputs.c b/src/lib/ecore_drm/ecore_drm_inputs.c
index cec69135c2..bf076dfc10 100644
--- a/src/lib/ecore_drm/ecore_drm_inputs.c
+++ b/src/lib/ecore_drm/ecore_drm_inputs.c
@@ -168,12 +168,15 @@ _device_add(Ecore_Drm_Input *input, const char *device)
168 goto seat_get_err; 168 goto seat_get_err;
169 169
170 data->seat = seat; 170 data->seat = seat;
171 data->node = eeze_udev_syspath_get_devpath(device); 171 if (!(data->node = eeze_udev_syspath_get_devpath(device)))
172 goto dev_err;
172 173
173 _ecore_drm_dbus_device_open(data->node, _cb_device_opened, data); 174 _ecore_drm_dbus_device_open(data->node, _cb_device_opened, data);
174 175
175 return EINA_TRUE; 176 return EINA_TRUE;
176 177
178dev_err:
179 free(data);
177seat_get_err: 180seat_get_err:
178 eina_stringshare_del(wlseat); 181 eina_stringshare_del(wlseat);
179seat_err: 182seat_err: