summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2026-02-03 10:55:02 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2026-02-23 14:38:22 +0100
commitd256efe6edab8129efb4d68a603ad1032bbe96fa (patch)
tree956441ad5c8c735a3c59ba3e0eb6cee464edaa9e /audio
parent097409f57df886991a3f46c75aa3249b8ab085f0 (diff)
downloadqemu-d256efe6edab8129efb4d68a603ad1032bbe96fa.tar.gz
qemu-d256efe6edab8129efb4d68a603ad1032bbe96fa.zip
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>
Diffstat (limited to 'audio')
-rw-r--r--audio/audio-mixeng-be.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/audio-mixeng-be.c b/audio/audio-mixeng-be.c
index a6d5812fc6..3704045051 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);