aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2011-01-21 19:53:55 +0900
committerAurelien Jarno <aurelien@aurel32.net>2011-01-25 09:22:51 +0100
commitd00b261816872d3e48adca584fca80ca21985f3b (patch)
tree24e1581d0ab82e02b28f1262752b904b5f30cba3 /monitor.c
parent52108a1ff02263e10b20544b7637241b0920983d (diff)
downloadqemu-d00b261816872d3e48adca584fca80ca21985f3b.zip
qemu-d00b261816872d3e48adca584fca80ca21985f3b.tar.gz
qemu-d00b261816872d3e48adca584fca80ca21985f3b.tar.bz2
monitor: use after free in do_wav_capture()
use after free in do_wav_capture() on the error path. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 0cda3da..c5f54f4 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2509,8 +2509,9 @@ static void do_wav_capture(Monitor *mon, const QDict *qdict)
nchannels = has_channels ? nchannels : 2;
if (wav_start_capture (s, path, freq, bits, nchannels)) {
- monitor_printf(mon, "Faied to add wave capture\n");
+ monitor_printf(mon, "Failed to add wave capture\n");
qemu_free (s);
+ return;
}
QLIST_INSERT_HEAD (&capture_head, s, entries);
}