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>
This commit is contained in:
parent
52108a1ff0
commit
d00b261816
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user