efl/legacy/edbus/src/lib
Lucas De Marchi 80bdcca7ed edbus: avoid cyclic unref
If we are freeing a EDBUS_Connection_Name its name_owner_changed signal
handler may hold a pointer and try to unref it when deleting the signal
handler. We can't simply make the signal handler hold a reference to the
connection name, otherwise edbus_connection_name_gc will never be
triggered because of cyclic references.

Thus, just set the cn->name_owner_changed->bus to NULL before trying to
delete the signal handler.

Related log found by Lucas Jóia:

==20607== Invalid read of size 4
==20607==    at 0x6FE29EE: edbus_connection_name_gc.isra.3 (edbus_core.c:375)
==20607==    by 0x6FE4287: edbus_connection_unref (edbus_core.c:1028)
==20607==    by 0x4C8D94: e_msgbus_shutdown (e_msgbus.c:167)
==20607==    by 0x436194: _e_main_shutdown (e_main.c:1136)
==20607==    by 0x434F25: main (e_main.c:1074)
==20607==  Address 0x1461ba68 is 24 bytes inside a block of size 64 free'd
==20607==    at 0x4C2A739: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20607==    by 0x6FF0E78: edbus_signal_handler_unref (edbus_signal_handler.c:269)
==20607==    by 0x6FE2A48: edbus_connection_name_gc.isra.3 (edbus_core.c:384)
==20607==    by 0x6FE4287: edbus_connection_unref (edbus_core.c:1028)
==20607==    by 0x4C8D94: e_msgbus_shutdown (e_msgbus.c:167)
==20607==    by 0x436194: _e_main_shutdown (e_main.c:1136)
==20607==    by 0x434F25: main (e_main.c:1074)



SVN revision: 81463
2012-12-20 14:52:27 +00:00
..
EDBus.h edbus: Add blank lines to separate function docs 2012-12-14 16:28:36 +00:00
edbus_connection.h edbus: (de)yodafy free cb functions 2012-12-19 17:30:11 +00:00
edbus_core.c edbus: avoid cyclic unref 2012-12-20 14:52:27 +00:00
edbus_freedesktop.c edbus: Dont create proxy of Object Manager on edbus_object_managed_objects_get() 2012-12-11 19:52:11 +00:00
edbus_freedesktop.h edbus: Add blank lines to separate function docs 2012-12-14 16:28:36 +00:00
edbus_message.c edbus: rename functions edbus_message{_iter,}_arguments_set 2012-12-18 20:05:02 +00:00
edbus_message.h edbus: unexport edbus_message_signal_new() 2012-12-18 21:38:49 +00:00
edbus_message_eina_value.h edbus: Add EINA_ARG_NONNULL and EINA_WARN_UNUSED_RESULT to API 2012-12-11 19:49:33 +00:00
edbus_message_from_eina_value.c edbus: rename functions edbus_message{_iter,}_arguments_set 2012-12-18 20:05:02 +00:00
edbus_message_helper.c edbus: Add dictionary iterator 2012-10-16 22:35:44 +00:00
edbus_message_helper.h edbus: Add EINA_ARG_NONNULL and EINA_WARN_UNUSED_RESULT to API 2012-12-11 19:49:33 +00:00
edbus_message_to_eina_value.c edbus: remove static from var 2012-12-03 12:09:43 +00:00
edbus_object.c edbus: Only create one ref of proxys when listen object manager 2012-12-20 01:55:34 +00:00
edbus_object.h edbus: (de)yodafy free cb functions 2012-12-19 17:30:11 +00:00
edbus_pending.c edbus: (de)yodafy free cb functions 2012-12-19 17:30:11 +00:00
edbus_pending.h edbus: (de)yodafy free cb functions 2012-12-19 17:30:11 +00:00
edbus_private.h edbus: unexport edbus_message_signal_new() 2012-12-18 21:38:49 +00:00
edbus_private_types.h edbus: Only one ref of Properties interface in each object 2012-12-11 19:52:06 +00:00
edbus_proxy.c edbus: (de)yodafy free cb functions 2012-12-19 17:30:11 +00:00
edbus_proxy.h edbus: (de)yodafy free cb functions 2012-12-19 17:30:11 +00:00
edbus_service.c edbus: Remove object path of service if ObjectManager is the last optional iface 2012-12-20 01:55:47 +00:00
edbus_service.h edbus: unref sent signal, also for complex types 2012-12-18 21:38:43 +00:00
edbus_signal_handler.c edbus: (de)yodafy free cb functions 2012-12-19 17:30:11 +00:00
edbus_signal_handler.h edbus: (de)yodafy free cb functions 2012-12-19 17:30:11 +00:00