From 11b2367714671d9c5e62580c5f5d1fb8fe3f2db1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 2 Nov 2011 14:54:44 +0100 Subject: [PATCH 05/11] monitor: use after free in do_wav_capture() RH-Author: Markus Armbruster Message-id: <1320245684-17620-2-git-send-email-armbru@redhat.com> Patchwork-id: 34839 O-Subject: [RHEL-6.2 PATCH 1/1] monitor: use after free in do_wav_capture() Bugzilla: 749830 RH-Acked-by: Alex Williamson RH-Acked-by: Juan Quintela RH-Acked-by: Kevin Wolf From: Isaku Yamahata use after free in do_wav_capture() on the error path. Signed-off-by: Isaku Yamahata Signed-off-by: Aurelien Jarno (cherry picked from commit d00b261816872d3e48adca584fca80ca21985f3b) Signed-off-by: Markus Armbruster --- monitor.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Signed-off-by: Michal Novotny --- monitor.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c index 3273914..67762ad 100644 --- a/monitor.c +++ b/monitor.c @@ -2364,8 +2364,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); } -- 1.7.7.3