提交 af5c3a10 编写于 作者: E Eric Blake

qemu: fix memory leak in blockinfo

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: NEric Blake <eblake@redhat.com>
上级 952f8a73
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册