]> 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>
Wed, 26 Jun 2013 16:09:31 +0000 (18:09 +0200)
commitb385809e4e2ee71522ecce027cd43ca181acf6de
tree70bd6d9a643333ef07b576b6761e9036630d0a1b
parent89c74908954ede64756faaf6f3e6ebc0d425c6f9
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