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>
Marc-André Lureau committed
Feb 3, 2026 at 10:55 UTC
d256efe6edab8129efb4d68a603ad1032bbe96fa
1 file changed
+2
audio/audio-mixeng-be.c
+2
@@ -227,6 +227,7 @@ static void audio_detach_capture (HWVoiceOut *hw)
227
CaptureVoiceOut *cap = sc->cap;
228
int was_active = sw->active;
229
230
+ g_clear_pointer(&sw->name, g_free);
231
if (sw->rate) {
232
st_rate_stop (sw->rate);
233
sw->rate = NULL;
@@ -1618,6 +1619,7 @@ static void audio_mixeng_backend_del_capture(
1619
SWVoiceCap *sc = (SWVoiceCap *) sw;
1620
1621
trace_audio_capture_free_sw(sw->name);
1622
+ g_clear_pointer(&sw->name, g_free);
1623
sw1 = sw->entries.le_next;
1624
if (sw->rate) {
1625
st_rate_stop (sw->rate);