pulseaudio/src/modules/dbus
Maarten Bosmans a1ce2426d8 Avoid read from freed memory
The order of freeing the hashmaps is important here, because otherwise a string used as key is freed before the hashmap
is freed.

Valgrind reports this as:
 Invalid read of size 1
    at 0x4107042: pa_idxset_string_hash_func (idxset.c:67)
    by 0x4106026: remove_entry (hashmap.c:93)
    by 0x41061BF: pa_hashmap_free (hashmap.c:110)
    by 0x71DD143: pa_dbusiface_core_free (iface-core.c:2105)
    by 0x71F2169: module_dbus_protocol_LTX_pa__done (module-dbus-protocol.c:595)
    by 0x406DC51: pa_module_free (module.c:162)
    by 0x406E01D: pa_module_unload_all (module.c:210)
    by 0x4068842: core_free (core.c:169)
    by 0x406FD5D: pa_object_unref (object.c:64)
    by 0x805224D: pa_core_unref (core.h:184)
    by 0x805560B: main (main.c:1159)
  Address 0x4d099c0 is 0 bytes inside a block of size 100 free'd
    at 0x4025BF0: free (vg_replace_malloc.c:366)
    by 0x40F128C: pa_xfree (xmalloc.c:131)
    by 0x71E4CEB: pa_dbusiface_device_free (iface-device.c:1293)
    by 0x71DCD7E: free_device_cb (iface-core.c:2062)
    by 0x41061D7: pa_hashmap_free (hashmap.c:113)
    by 0x71DD125: pa_dbusiface_core_free (iface-core.c:2104)
    by 0x71F2169: module_dbus_protocol_LTX_pa__done (module-dbus-protocol.c:595)
    by 0x406DC51: pa_module_free (module.c:162)
    by 0x406E01D: pa_module_unload_all (module.c:210)
    by 0x4068842: core_free (core.c:169)
    by 0x406FD5D: pa_object_unref (object.c:64)
    by 0x805224D: pa_core_unref (core.h:184)
2011-08-15 09:41:56 +01:00
..
iface-card-profile.c dbusiface-card-profile: Assert the core argument isn't NULL. 2009-08-15 05:53:36 +03:00
iface-card-profile.h Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
iface-card.c Rename all the signal parameters and variables to something more explicit. 2009-11-21 00:46:46 +01:00
iface-card.h dbusiface-card-profile: Implement the CardProfile D-Bus interface. 2009-08-09 10:36:20 +03:00
iface-client.c Merge remote branch 'tanuk/master' 2009-11-30 14:55:57 +00:00
iface-client.h dbusiface-client: Fix the interface name. 2009-08-15 17:08:21 +03:00
iface-core.c Avoid read from freed memory 2011-08-15 09:41:56 +01:00
iface-core.h dbusiface-core: Two new functions: pa_dbusiface_core_get_sink/source(). 2009-08-17 16:42:58 +03:00
iface-device-port.c dbusiface-device: Implement the Device and DevicePort D-Bus interfaces. 2009-08-15 06:18:41 +03:00
iface-device-port.h dbusiface-device: Implement the Device and DevicePort D-Bus interfaces. 2009-08-15 06:18:41 +03:00
iface-device.c capture: Implement per-stream volume control for capture streams. 2011-06-22 22:45:27 +01:00
iface-device.h dbusiface-device: Implement the Device and DevicePort D-Bus interfaces. 2009-08-15 06:18:41 +03:00
iface-memstats.c dbus: Do not refcnt the core. 2011-03-25 23:43:26 +00:00
iface-memstats.h dbus: Three entangled changes: 2009-08-09 08:37:33 +03:00
iface-module.c Rename all the signal parameters and variables to something more explicit. 2009-11-21 00:46:46 +01:00
iface-module.h dbusiface-module: Implement the Module D-Bus interface. 2009-08-24 14:27:14 +03:00
iface-sample.c volume: Fix incorrect usage of PA_VOLUME_IS_VALID 2010-10-19 09:52:19 +01:00
iface-sample.h dbusiface-sample: Implement the Sample D-Bus interface. 2009-08-19 09:18:50 +03:00
iface-stream.c sink-input: Add volume_writable to pa_sink_input. 2011-03-29 21:18:06 +01:00
iface-stream.h dbusiface-stream: Implement about a half of the Stream D-Bus interface. 2009-08-16 19:42:56 +03:00
module-dbus-protocol.c Plug some memory leaks and an invalid read 2011-08-12 20:31:52 +02:00