diff options
author | John Ferlan <jferlan@redhat.com> | 2014-08-27 15:40:57 -0400 |
---|---|---|
committer | John Ferlan <jferlan@redhat.com> | 2014-08-28 08:12:17 -0400 |
commit | 91a60a560fea10e1693b49125180b60405ee9ad8 (patch) | |
tree | 209aec5b2e7aa2351c429f377cd24a622824737e | |
parent | 69e433bc22a3d713af379ce5a787e470d67db6e8 (diff) | |
download | libvirt-91a60a560fea10e1693b49125180b60405ee9ad8.tar.gz |
storage_conf: Resolve Coverity RESOURCE_LEAK
If there was a failure processing 'authdef' and the code went to cleanup
before the setting to source->auth, then it'd be leaked.
-rw-r--r-- | src/conf/storage_conf.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |