diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 5a16767f16..e72a869cba 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -661,6 +661,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt, } source->auth = authdef; + authdef = NULL; } source->vendor = virXPathString("string(./vendor/@name)", ctxt); @@ -673,6 +674,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt, VIR_FREE(port); VIR_FREE(nodeset); VIR_FREE(adapter_type); + virStorageAuthDefFree(authdef); return ret; }