[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/32] qcow2: Fix leaks in dirty images
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 08/32] qcow2: Fix leaks in dirty images |
Date: |
Thu, 23 Oct 2014 22:42:15 +0200 |
From: Max Reitz <address@hidden>
When opening dirty images, qcow2's repair function should not only
repair errors but leaks as well.
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: BenoƮt Canet <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qcow2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 3c8b881..7a2c66f 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -910,7 +910,7 @@ static int qcow2_open(BlockDriverState *bs, QDict *options,
int flags,
(s->incompatible_features & QCOW2_INCOMPAT_DIRTY)) {
BdrvCheckResult result = {0};
- ret = qcow2_check(bs, &result, BDRV_FIX_ERRORS);
+ ret = qcow2_check(bs, &result, BDRV_FIX_ERRORS | BDRV_FIX_LEAKS);
if (ret < 0) {
error_setg_errno(errp, -ret, "Could not repair dirty image");
goto fail;
--
1.8.3.1
- [Qemu-devel] [PULL 00/32] Block patches, Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 03/32] MAINTAINERS: add the image fuzzer to the block layer, Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 01/32] MAINTAINERS: add aio to block layer, Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 05/32] block: qemu-iotests change _supported_proto to file once more., Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 02/32] MAINTAINERS: qemu-iotests belongs to the block layer, Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 06/32] block: Add qemu_{,try_}blockalign0(), Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 04/32] block/vdi: Use {DIV_,}ROUND_UP, Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 08/32] qcow2: Fix leaks in dirty images,
Kevin Wolf <=
- [Qemu-devel] [PULL 07/32] qcow2: Calculate refcount block entry count, Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 09/32] qcow2: Split qcow2_check_refcounts(), Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 10/32] qcow2: Use sizeof(**refcount_table), Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 11/32] qcow2: Pull check_refblocks() up, Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 13/32] qcow2: Split fail code in L1 and L2 checks, Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 12/32] qcow2: Use int64_t for in-memory reftable size, Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 14/32] qcow2: Let inc_refcounts() return -errno, Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 16/32] qcow2: Reuse refcount table in calculate_refcounts(), Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 15/32] qcow2: Let inc_refcounts() resize the reftable, Kevin Wolf, 2014/10/23
- [Qemu-devel] [PULL 17/32] qcow2: Fix refcount blocks beyond image end, Kevin Wolf, 2014/10/23