]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainChrRemove: Don't leak vmdef->consoles[0]
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 12 Apr 2023 12:14:30 +0000 (14:14 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 18 Apr 2023 14:02:35 +0000 (16:02 +0200)
commite99072731c22bf43e424fc07c46fb84e7c409a70
tree181cf6f20fe759ed5f9d0cac2eef9f547a68d199
parent9129643d26c275a7a25bae8757d7f0d1cd86433c
qemuDomainChrRemove: Don't leak vmdef->consoles[0]

When removing the compat console from domain defintion, removing
it from the vmdef->consoles array is good, but not sufficient.
The console definition might have been fully allocated (after
daemon restarted and reloaded the status XML). Use
virDomainChrDefFree() to free also the definition.

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