]> git.proxmox.com Git - mirror_qemu.git/commitdiff
audio: fix memory leak reported by ASAN
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>
Sun, 18 Aug 2019 23:06:59 +0000 (01:06 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 21 Aug 2019 07:13:37 +0000 (09:13 +0200)
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>
audio/audio.c

index 9ce229969526b9cbb6b231bd3d62f630706e57b4..7d715332c993754d661af6f5065d4e78463a380a 100644 (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);
 }