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