[pulseaudio-commits] src/modules
Tanu Kaskinen
tanuk at kemper.freedesktop.org
Thu Apr 17 01:15:54 PDT 2014
src/modules/dbus/iface-device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit a306d66525a996a5095ff144b7b03403d2666cb5
Author: Juho Hämäläinen <juho.hamalainen at tieto.com>
Date: Tue Apr 15 16:11:48 2014 +0300
dbus: Use correct initialization for source ports hashmap.
Source ports hashmap is created without value freeing function, which
results in (hashmap values) device ports not being freed when source
ports are removed or module is unloaded. This results in memory leak
during normal operation and during daemon shutdown dbus_protocol shared
object isn't unreferenced correctly, leaving dbus_protocol object in
core->shared, which causes assert when shared hashmap is checked for
isempty() before freeing.
diff --git a/src/modules/dbus/iface-device.c b/src/modules/dbus/iface-device.c
index 34b370b..625f057 100644
--- a/src/modules/dbus/iface-device.c
+++ b/src/modules/dbus/iface-device.c
@@ -1248,7 +1248,7 @@ pa_dbusiface_device *pa_dbusiface_device_new_source(pa_dbusiface_core *core, pa_
d->volume = *pa_source_get_volume(source, false);
d->mute = pa_source_get_mute(source, false);
d->source_state = pa_source_get_state(source);
- d->ports = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
+ d->ports = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL, (pa_free_cb_t) pa_dbusiface_device_port_free);
d->next_port_index = 0;
d->active_port = source->active_port;
d->proplist = pa_proplist_copy(source->proplist);
More information about the pulseaudio-commits
mailing list