qemu: Fix memleak after commit 59898a88ce

If the ABI compatibility check with the "migratable" user XML is
successful, we would leak the originally parsed XML from the user that
would not be used in this case.

Reported by Ján Tomko.
This commit is contained in:
Peter Krempa 2013-09-17 11:01:34 +02:00
parent 2e23c77b00
commit 044e3e7524

View File

@ -5274,6 +5274,8 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
/* use the user provided XML */
newdef = def2;
def2 = NULL;
} else {
virDomainDefFree(def2);
}
virDomainDefFree(def);