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>
This commit is contained in:
Kővágó, Zoltán 2019-08-19 01:06:59 +02:00 committed by Gerd Hoffmann
parent 7520462bc1
commit e76ba19a1f
1 changed files with 6 additions and 0 deletions

View File

@ -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);
}