[PATCH] qemu: fix memory leak in blockinfo

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

 



Coverity flagged commit 0282ca45 as introducing a memory leak;
in all my refactoring to make capacity probing conditional on
whether the image is non-raw, I missed deleting the unconditional
probe.

* src/qemu/qemu_driver.c (qemuStorageLimitsRefresh): Drop
redundant assignment.

Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
---

Pushing as a trivial fix.

 src/qemu/qemu_driver.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 89578e1..ebbb656 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11116,9 +11116,6 @@ qemuStorageLimitsRefresh(virQEMUDriverPtr driver,
                                                        buf, len)) < 0)
             goto cleanup;
     }
-    if (!(meta = virStorageFileGetMetadataFromBuf(src->path, buf, len,
-                                                  format, NULL)))
-        goto cleanup;
     if (format == VIR_STORAGE_FILE_RAW)
         src->capacity = src->physical;
     else if ((meta = virStorageFileGetMetadataFromBuf(src->path, buf,
-- 
1.9.3

--
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]