From e76ba19a1f1377314573a6df7e2d82b597aa3d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= Date: Mon, 19 Aug 2019 01:06:59 +0200 Subject: [PATCH] audio: fix memory leak reported by ASAN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kővágó, Zoltán Reviewed-by: Philippe Mathieu-Daudé Message-id: ed35e9e72aa77c9376e9c8a8f3a5443703fe6fbe.1566168923.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann --- audio/audio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/audio/audio.c b/audio/audio.c index 9ce2299695..7d715332c9 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1345,6 +1345,12 @@ static void free_audio_state(AudioState *s) qapi_free_Audiodev(s->dev); s->dev = NULL; } + + if (s->ts) { + timer_free(s->ts); + s->ts = NULL; + } + g_free(s); }