From: Marc-André Lureau <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
---
audio/audio-mixeng-be.c | 2 ++
1 file changed, 2 insertions(+)
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);
--
2.53.0