audio: fix leak of audio capture name

Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau
2026-02-03 10:55:02 +04:00
parent 097409f57d
commit d256efe6ed

View File

@@ -227,6 +227,7 @@ static void audio_detach_capture (HWVoiceOut *hw)
CaptureVoiceOut *cap = sc->cap;
int was_active = sw->active;
g_clear_pointer(&sw->name, g_free);
if (sw->rate) {
st_rate_stop (sw->rate);
sw->rate = NULL;
@@ -1618,6 +1619,7 @@ static void audio_mixeng_backend_del_capture(
SWVoiceCap *sc = (SWVoiceCap *) sw;
trace_audio_capture_free_sw(sw->name);
g_clear_pointer(&sw->name, g_free);
sw1 = sw->entries.le_next;
if (sw->rate) {
st_rate_stop (sw->rate);