From: Marc-André Lureau Date: Tue, 3 Feb 2026 06:55:02 +0000 (+0400) Subject: audio: fix leak of audio capture name X-Git-Tag: v11.0.0-rc0~55^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d256efe6edab8129efb4d68a603ad1032bbe96fa;p=thirdparty%2Fqemu.git audio: fix leak of audio capture name Reviewed-by: Akihiko Odaki Signed-off-by: Marc-André Lureau --- diff --git a/audio/audio-mixeng-be.c b/audio/audio-mixeng-be.c index a6d5812fc65..37040450511 100644 --- a/audio/audio-mixeng-be.c +++ b/audio/audio-mixeng-be.c @@ -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);