qemu: Use VIR_AUTOFREE in qemuDomainObjPrivateXMLParseJobNBDSource

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2019-03-20 17:08:42 +01:00
parent 08c4a54ec0
commit e1899a2490

View File

@ -2714,8 +2714,8 @@ qemuDomainObjPrivateXMLParseJobNBDSource(xmlNodePtr node,
{ {
VIR_XPATH_NODE_AUTORESTORE(ctxt); VIR_XPATH_NODE_AUTORESTORE(ctxt);
qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
char *format = NULL; VIR_AUTOFREE(char *) format = NULL;
char *type = NULL; VIR_AUTOFREE(char *) type = NULL;
int ret = -1; int ret = -1;
VIR_AUTOUNREF(virStorageSourcePtr) migrSource = NULL; VIR_AUTOUNREF(virStorageSourcePtr) migrSource = NULL;
xmlNodePtr sourceNode; xmlNodePtr sourceNode;
@ -2771,8 +2771,6 @@ qemuDomainObjPrivateXMLParseJobNBDSource(xmlNodePtr node,
ret = 0; ret = 0;
cleanup: cleanup:
VIR_FREE(format);
VIR_FREE(type);
return ret; return ret;
} }