summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Roberto de Souza <zehortigoza@profusion.mobi>2012-12-17 19:48:54 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2012-12-17 19:48:54 +0000
commit36e5dd2ebc8a118a4809d6c4d840e0433ceb8120 (patch)
treee7eb4da5c6ef906c153dacae5964d4e6f0573fb0
parent165eb12d81d5785ed172b8c6714b2475a0c1883f (diff)
edbus: Fix invalid access memory in edbus_service_interface_unregister()
_object_unregister is called synchronized by libdbus, so when _interface_free() ran your object its already freed. ==30579== Invalid read of size 4 ==30579== at 0x4775190: _find_object_manager_parent (edbus_service.c:803) ==30579== by 0x4775292: _interface_free (edbus_service.c:1011) ==30579== by 0x4777F1D: edbus_service_interface_unregister (edbus_service.c:1101) ==30579== by 0x40CBD28: elm_dbus_menu_delete (elm_dbus_menu.c:128) ==30579== by 0x414552F: _elm_menu_smart_del (elm_menu.c:562) ==30579== by 0x4810F39: _eo_op_internal (eo.c:363) ==30579== by 0x4812E1B: eo_do_internal (eo.c:403) ==30579== by 0x4279D02: evas_object_smart_del (evas_object_smart.c:1080) Patch by: José Roberto de Souza <zehortigoza@profusion.mobi> SVN revision: 81180
Diffstat (limited to '')
-rw-r--r--legacy/edbus/src/lib/edbus_service.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/legacy/edbus/src/lib/edbus_service.c b/legacy/edbus/src/lib/edbus_service.c
index 0eeee8c45e..a68ea8a3a3 100644
--- a/legacy/edbus/src/lib/edbus_service.c
+++ b/legacy/edbus/src/lib/edbus_service.c
@@ -1095,9 +1095,14 @@ EAPI void
1095edbus_service_interface_unregister(EDBus_Service_Interface *iface) 1095edbus_service_interface_unregister(EDBus_Service_Interface *iface)
1096{ 1096{
1097 EDBUS_SERVICE_INTERFACE_CHECK(iface); 1097 EDBUS_SERVICE_INTERFACE_CHECK(iface);
1098 if (!eina_hash_find(iface->obj->interfaces, objmanager->name))
1099 {
1100 //properties + introspectable + iface that user wants unregister
1101 if (eina_hash_population(iface->obj->interfaces) < 4)
1102 edbus_service_object_unregister(iface);
1103 return;
1104 }
1098 eina_hash_del(iface->obj->interfaces, NULL, iface); 1105 eina_hash_del(iface->obj->interfaces, NULL, iface);
1099 if (eina_hash_population(iface->obj->interfaces) < 3)
1100 edbus_service_object_unregister(iface);
1101 _interface_free(iface); 1106 _interface_free(iface);
1102} 1107}
1103 1108