]> git.ipfire.org Git - thirdparty/libvirt.git/commit
hotplug: only add a chardev to vmdef after monitor call
authorJán Tomko <jtomko@redhat.com>
Tue, 27 Jan 2015 17:44:30 +0000 (18:44 +0100)
committerJán Tomko <jtomko@redhat.com>
Wed, 28 Jan 2015 09:10:54 +0000 (10:10 +0100)
commit21e0e8866e341da74e296ca3cf2d97812e847a66
tree4cfd6f17216e5f8f8496ad2e51039e34ed55f814
parentdaf51be5f1b0f7b41c0813d43d6b66edfbe4f6d9
hotplug: only add a chardev to vmdef after monitor call

https://bugzilla.redhat.com/show_bug.cgi?id=1161024

This way the device is in vmdef only if ret = 0 and the caller
(qemuDomainAttachDeviceFlags) does not free it.

Otherwise it might get double freed by qemuProcessStop
and qemuDomainAttachDeviceFlags if the domain crashed
in monitor after we've added it to vm->def.
src/qemu/qemu_hotplug.c