edbus: Do not modify cn->names hash while walking it
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 20 Dec 2012 14:52:21 +0000 (14:52 +0000)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 20 Dec 2012 14:52:21 +0000 (14:52 +0000)
commit29d42f4f44dc8bf52e4932949972807694dd1c92
tree3551009f3c530a6bcfa7ade1384db7b22e0d1a40
parentead8c862744a697fbf8fb9b4a83bd899e2ac2e6e
edbus: Do not modify cn->names hash while walking it

Bug triggered by Lucas Jóia:

==10042== Invalid read of size 8
==10042==    at 0x6B86626: _eina_rbtree_iterator_next (eina_rbtree.c:165)
==10042==    by 0x6B7228D: _eina_hash_iterator_next (eina_hash.c:622)
==10042==    by 0x6FE41DC: edbus_connection_unref (edbus_core.c:1015)
==10042==    by 0x4C8D94: e_msgbus_shutdown (e_msgbus.c:167)
==10042==    by 0x436194: _e_main_shutdown (e_main.c:1136)
==10042==    by 0x434F25: main (e_main.c:1074)
==10042==  Address 0x15c1b958 is 40 bytes inside a block of size 96 free'd
==10042==    at 0x4C2A739: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==10042==    by 0x6B71CB7: _eina_hash_del_by_hash_el (eina_hash.c:441)
==10042==    by 0x6FE2A1E: edbus_connection_name_gc.isra.2 (edbus_core.c:385)
==10042==    by 0x6FE4217: edbus_connection_unref (edbus_core.c:1026)
==10042==    by 0x4C8D94: e_msgbus_shutdown (e_msgbus.c:167)
==10042==    by 0x436194: _e_main_shutdown (e_main.c:1136)
==10042==    by 0x434F25: main (e_main.c:1074)

SVN revision: 81462
src/lib/edbus_core.c