[PATCH 04/11] qemu: block: Use VIR_AUTOPTR for virURIPtr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_block.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 769e07d3d8..0504a79957 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -435,7 +435,7 @@ qemuBlockStorageSourceSupportsConcurrentAccess(virStorageSourcePtr src)
 virURIPtr
 qemuBlockStorageSourceGetURI(virStorageSourcePtr src)
 {
-    virURIPtr uri = NULL;
+    VIR_AUTOPTR(virURI) uri = NULL;
     virURIPtr ret = NULL;

     if (src->nhosts != 1) {
@@ -480,7 +480,6 @@ qemuBlockStorageSourceGetURI(virStorageSourcePtr src)
     VIR_STEAL_PTR(ret, uri);

  cleanup:
-    virURIFree(uri);
     return ret;
 }

@@ -745,7 +744,7 @@ qemuBlockStorageSourceGetCURLProps(virStorageSourcePtr src)
     const char *passwordalias = NULL;
     const char *username = NULL;
     virJSONValuePtr ret = NULL;
-    virURIPtr uri = NULL;
+    VIR_AUTOPTR(virURI) uri = NULL;
     char *uristr = NULL;
     const char *driver;

@@ -782,7 +781,6 @@ qemuBlockStorageSourceGetCURLProps(virStorageSourcePtr src)
                                           NULL));

  cleanup:
-    virURIFree(uri);
     VIR_FREE(uristr);

     return ret;
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux