mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
sink, source: Fix a volume change leak
When a sink or source is freed, there may be pending volume changes that didn't get applied before the IO thread got torn down. Those pending changes need to be freed. The memory leak was reported here: http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/23162/focus=23169 Reported-by: Alexander E. Patrakov <patrakov@gmail.com>
This commit is contained in:
parent
30b6c111a6
commit
1f659cc836
2 changed files with 4 additions and 0 deletions
|
|
@ -727,6 +727,8 @@ static void sink_free(pa_object *o) {
|
|||
|
||||
pa_log_info("Freeing sink %u \"%s\"", s->index, s->name);
|
||||
|
||||
pa_sink_volume_change_flush(s);
|
||||
|
||||
if (s->monitor_source) {
|
||||
pa_source_unref(s->monitor_source);
|
||||
s->monitor_source = NULL;
|
||||
|
|
|
|||
|
|
@ -662,6 +662,8 @@ static void source_free(pa_object *o) {
|
|||
|
||||
pa_log_info("Freeing source %u \"%s\"", s->index, s->name);
|
||||
|
||||
pa_source_volume_change_flush(s);
|
||||
|
||||
pa_idxset_free(s->outputs, NULL);
|
||||
pa_hashmap_free(s->thread_info.outputs);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue