summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-12-10 14:26:52 -0500
committerChris Michael <cp.michael@samsung.com>2014-12-10 14:26:52 -0500
commit0b77b7f59f483ee834536e528f5202d293faeb36 (patch)
tree2b978f091115906c78c24e6def0139df80e8a2e2 /src/lib
parent251c300b8f908f573fbc0606cc4285db2ac724f7 (diff)
ecore-drm: Free devices before we release the libinput reference
Summary: When destroying evdev devices, we make calls to libinput_device_unref ... but we cannot Make that call if the libinput context has been destroyed already (as happens when we free input). So to fix, don't release the libinput context until all devices have been released. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_drm/ecore_drm_inputs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_inputs.c b/src/lib/ecore_drm/ecore_drm_inputs.c
index 1ba00a5140..0c764673a9 100644
--- a/src/lib/ecore_drm/ecore_drm_inputs.c
+++ b/src/lib/ecore_drm/ecore_drm_inputs.c
@@ -295,13 +295,6 @@ ecore_drm_inputs_destroy(Ecore_Drm_Device *dev)
295 Ecore_Drm_Seat *seat; 295 Ecore_Drm_Seat *seat;
296 Ecore_Drm_Evdev *edev; 296 Ecore_Drm_Evdev *edev;
297 297
298 EINA_LIST_FREE(dev->inputs, input)
299 {
300 if (input->hdlr) ecore_main_fd_handler_del(input->hdlr);
301 if (input->libinput) libinput_unref(input->libinput);
302 free(input);
303 }
304
305 EINA_LIST_FREE(dev->seats, seat) 298 EINA_LIST_FREE(dev->seats, seat)
306 { 299 {
307 EINA_LIST_FREE(seat->devices, edev) 300 EINA_LIST_FREE(seat->devices, edev)
@@ -310,6 +303,13 @@ ecore_drm_inputs_destroy(Ecore_Drm_Device *dev)
310 if (seat->name) eina_stringshare_del(seat->name); 303 if (seat->name) eina_stringshare_del(seat->name);
311 free(seat); 304 free(seat);
312 } 305 }
306
307 EINA_LIST_FREE(dev->inputs, input)
308 {
309 if (input->hdlr) ecore_main_fd_handler_del(input->hdlr);
310 if (input->libinput) libinput_unref(input->libinput);
311 free(input);
312 }
313} 313}
314 314
315EAPI Eina_Bool 315EAPI Eina_Bool