]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: edit: don't leak XML string on reedit or redefine
authorJán Tomko <jtomko@redhat.com>
Tue, 25 Jun 2013 13:10:27 +0000 (15:10 +0200)
committerJán Tomko <jtomko@redhat.com>
Mon, 1 Jul 2013 11:43:50 +0000 (13:43 +0200)
commit81307698c11387304dae46af56983cc800741946
tree4f0fb4f5ef9158c63c1d75484872e3a5e6ba2736
parentca62fde8252b8509d78e0e61547d9ceeb8b516d4
virsh: edit: don't leak XML string on reedit or redefine

Free the old XML strings before overwriting them if the user
has chosen to reedit the file or force the redefinition.

Found by Alex Jia trying to reproduce another bug:
https://bugzilla.redhat.com/show_bug.cgi?id=977430#c3
(cherry picked from commit 1e3a252974c8e5c650f1d84dc2b167f0ae8cee3c)
tools/virsh-edit.c