[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/28] qcow2: fix leak of Qcow2DiscardRegion in updat
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 01/28] qcow2: fix leak of Qcow2DiscardRegion in update_refcount_discard |
Date: |
Mon, 20 Oct 2014 15:35:27 +0200 |
From: Zhang Haoyu <address@hidden>
When the Qcow2DiscardRegion is adjacent to another one referenced by "d",
free this Qcow2DiscardRegion metadata referenced by "p" after
it was removed from s->discards queue.
Signed-off-by: Zhang Haoyu <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qcow2-refcount.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 2bcaaf9..c31d85a 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -524,6 +524,7 @@ found:
QTAILQ_REMOVE(&s->discards, p, next);
d->offset = MIN(d->offset, p->offset);
d->bytes += p->bytes;
+ g_free(p);
}
}
--
1.8.3.1
- [Qemu-devel] [PULL 00/28] Block patches, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 02/28] block/raw-posix: Fix disk corruption in try_fiemap, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 03/28] block/raw-posix: use seek_hole ahead of fiemap, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 01/28] qcow2: fix leak of Qcow2DiscardRegion in update_refcount_discard,
Kevin Wolf <=
- [Qemu-devel] [PULL 05/28] block: Split bdrv_new_root() off bdrv_new(), Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 06/28] block: New BlockBackend, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 04/28] nbd: Fix filename generation, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 07/28] block: Connect BlockBackend to BlockDriverState, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 09/28] block: Code motion to get rid of stubs/blockdev.c, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 08/28] block: Connect BlockBackend and DriveInfo, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 10/28] block: Make BlockBackend own its BlockDriverState, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 11/28] blockdev: Eliminate drive_del(), Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 12/28] block: Eliminate bdrv_iterate(), use bdrv_next(), Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 13/28] block: Eliminate BlockDriverState member device_name[], Kevin Wolf, 2014/10/20