]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Fix a memory leak in qemudExtractTTYPath
authorMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 9 Jan 2010 20:19:08 +0000 (21:19 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Mon, 11 Jan 2010 22:58:56 +0000 (23:58 +0100)
commitf01ee2acc84100a92288c2bb253c9bd48403949e
tree50cb0a6684d07f4f4f7e5806bfaddb6f2efcdf34
parent4c81b0fdc57b23d80b1b4752cd6143d15c02e9c8
qemu: Fix a memory leak in qemudExtractTTYPath

qemudWaitForMonitor calls qemudReadLogOutput with qemudFindCharDevicePTYs
as callback. qemudFindCharDevicePTYs calls qemudExtractTTYPath to assign
a string to chr->data.file.path. Afterwards qemudWaitForMonitor may call
qemudFindCharDevicePTYsMonitor that overwrites chr->data.file.path without
freeing the old value. This results in leaking the memory allocated by
qemudExtractTTYPath.

Report an OOM error if the strdup in qemudFindCharDevicePTYsMonitor fails.
src/qemu/qemu_driver.c