aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>2019-08-19 01:06:59 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-08-21 09:13:37 +0200
commite76ba19a1f1377314573a6df7e2d82b597aa3d0a (patch)
treeba98c903666a3836e6a6ce9f4379a74f89e677be /audio
parent7520462bc1eeda2f724ec84ff16338053b728920 (diff)
downloadqemu-e76ba19a1f1377314573a6df7e2d82b597aa3d0a.zip
qemu-e76ba19a1f1377314573a6df7e2d82b597aa3d0a.tar.gz
qemu-e76ba19a1f1377314573a6df7e2d82b597aa3d0a.tar.bz2
audio: fix memory leak reported by ASAN
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: ed35e9e72aa77c9376e9c8a8f3a5443703fe6fbe.1566168923.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio')
-rw-r--r--audio/audio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/audio/audio.c b/audio/audio.c
index 9ce2299..7d71533 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);
}