X-Git-Url: https://code.delx.au/pulseaudio/blobdiff_plain/14e2553185e1afa93737586771326cd12a154239..eca082a93f2619cfa10733947a81fa779cb49573:/src/pulsecore/sink-input.c diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index fb2a8936..b9264419 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -1324,13 +1324,9 @@ int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) { pa_assert_ctl_context(); pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); - v = pa_hashmap_remove(i->volume_factor_items, key); - - if (!v) + if (pa_hashmap_remove_and_free(i->volume_factor_items, key) < 0) return -1; - volume_factor_entry_free(v); - switch (pa_hashmap_size(i->volume_factor_items)) { case 0: pa_cvolume_reset(&i->volume_factor, i->sample_spec.channels);