(!strcmp(dev->identifier, identifier)))
break;
}
- g_rec_mutex_unlock(&e_devicemgr->device_list_mutex);
+
if (!dev)
{
+ g_rec_mutex_unlock(&e_devicemgr->device_list_mutex);
return;
}
if (dev->identifier) eina_stringshare_del(dev->identifier);
if (dev->seat_name) eina_stringshare_del(dev->seat_name);
- g_rec_mutex_lock(&e_devicemgr->device_list_mutex);
e_devicemgr->device_list = eina_list_remove(e_devicemgr->device_list, dev);
- g_rec_mutex_unlock(&e_devicemgr->device_list_mutex);
if (e_devicemgr->last_device_ptr == dev)
e_devicemgr->last_device_ptr = NULL;
atomic_store(&e_devicemgr->last_device_kbd, NULL);
E_FREE(dev);
+
+ g_rec_mutex_unlock(&e_devicemgr->device_list_mutex);
}
static void