diff options
author | John Ferlan <jferlan@redhat.com> | 2019-01-31 10:21:47 -0500 |
---|---|---|
committer | John Ferlan <jferlan@redhat.com> | 2019-02-12 08:51:23 -0500 |
commit | 2f92d59c781eb0e241837ea4f52fcf0c9dc23d23 (patch) | |
tree | 0e50343a0b197269e0575297291797449e8d5238 /tests/storagepoolxml2xmltest.c | |
parent | d2ddcdc1a2250d044ac7fc2c0585bad7234c08aa (diff) | |
download | libvirt-2f92d59c781eb0e241837ea4f52fcf0c9dc23d23.tar.gz |
conf: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStoragePoolDef
Let's make use of the auto __cleanup capabilities cleaning up any
now unnecessary goto paths.
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'tests/storagepoolxml2xmltest.c')
-rw-r--r-- | tests/storagepoolxml2xmltest.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/storagepoolxml2xmltest.c b/tests/storagepoolxml2xmltest.c index acb15f3a2c..c8d5c41cd4 100644 --- a/tests/storagepoolxml2xmltest.c +++ b/tests/storagepoolxml2xmltest.c @@ -20,7 +20,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml) { char *actual = NULL; int ret = -1; - virStoragePoolDefPtr dev = NULL; + VIR_AUTOPTR(virStoragePoolDef) dev = NULL; if (!(dev = virStoragePoolDefParseFile(inxml))) goto fail; @@ -35,7 +35,6 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml) fail: VIR_FREE(actual); - virStoragePoolDefFree(dev); return ret; } |