qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] audio: release capture buffers


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH] audio: release capture buffers
Date: Fri, 28 Apr 2017 09:56:12 +0200

AUD_add_capture() allocates two buffers which get never released.
Add the missing calls to AUD_del_capture().

Impact: Allows vnc clients to exhaust host memory by repeatly
starting and stopping audio capture.

Cc: P J P <address@hidden>
Cc: Huawei PSIRT <address@hidden>
Reported-by: "Jiangxin (hunter, SCC)" <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
 audio/audio.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/audio/audio.c b/audio/audio.c
index c8898d8422..beafed209b 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -2028,6 +2028,8 @@ void AUD_del_capture (CaptureVoiceOut *cap, void 
*cb_opaque)
                     sw = sw1;
                 }
                 QLIST_REMOVE (cap, entries);
+                g_free (cap->hw.mix_buf);
+                g_free (cap->buf);
                 g_free (cap);
             }
             return;
-- 
2.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]