diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index f185613eea69081990dd3612b7fa60f565167e14..ffe666dedaa62ac279f633851d6028020c602595 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2714,8 +2714,8 @@ qemuDomainObjPrivateXMLParseJobNBDSource(xmlNodePtr node, { VIR_XPATH_NODE_AUTORESTORE(ctxt); qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); - char *format = NULL; - char *type = NULL; + VIR_AUTOFREE(char *) format = NULL; + VIR_AUTOFREE(char *) type = NULL; int ret = -1; VIR_AUTOUNREF(virStorageSourcePtr) migrSource = NULL; xmlNodePtr sourceNode; @@ -2771,8 +2771,6 @@ qemuDomainObjPrivateXMLParseJobNBDSource(xmlNodePtr node, ret = 0; cleanup: - VIR_FREE(format); - VIR_FREE(type); return ret; }