mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
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.
This commit is contained in:
parent
7fac107301
commit
a306d66525
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue