]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainRemoveChrDevice: Deal with qemuDomainChrRemove() failure
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 12 Apr 2023 08:22:42 +0000 (10:22 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 18 Apr 2023 14:02:35 +0000 (16:02 +0200)
commitb5a591f73b681baa9b9b1efe38bbf3f7ab704b11
treee5211b55f38a3e5a1957d65f22470338f49f0371
parentfc8320faef32e08a5ea70a1537c90f90fee8b04f
qemuDomainRemoveChrDevice: Deal with qemuDomainChrRemove() failure

When cleaning up after removed device, qemuDomainChrRemove() is
called. But this may fail, in which case we successfully ignore
the failure and virDomainChrDefFree() the device anyway. While it
decreases our memory consumption, it's a bit too far, especially
if the next step is 'virsh dumpxml'. Then our memory consumption
decreases all the way down to zero as we crash.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_hotplug.c