]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: fix memory leak in blockinfo
authorEric Blake <eblake@redhat.com>
Wed, 17 Dec 2014 23:10:45 +0000 (16:10 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 17 Dec 2014 23:10:45 +0000 (16:10 -0700)
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@redhat.com>
src/qemu/qemu_driver.c

index 89578e1dc7930f49bf0be826444f2de1f083039f..ebbb65632858978afef40a32e46a08283a5d41a7 100644 (file)
@@ -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,