mirror of https://gitee.com/openkylin/qemu.git
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:
parent
7520462bc1
commit
e76ba19a1f
|
@ -1345,6 +1345,12 @@ static void free_audio_state(AudioState *s)
|
||||||
qapi_free_Audiodev(s->dev);
|
qapi_free_Audiodev(s->dev);
|
||||||
s->dev = NULL;
|
s->dev = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s->ts) {
|
||||||
|
timer_free(s->ts);
|
||||||
|
s->ts = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
g_free(s);
|
g_free(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue