|
|
05bba0 |
From b0f23a00b51a43aefe975fd2748c9b079a499d95 Mon Sep 17 00:00:00 2001
|
|
|
05bba0 |
From: Max Reitz <mreitz@redhat.com>
|
|
|
05bba0 |
Date: Sat, 13 Jun 2015 16:22:06 +0200
|
|
|
05bba0 |
Subject: [PATCH 12/42] qcow2: fix leak of Qcow2DiscardRegion in
|
|
|
05bba0 |
update_refcount_discard
|
|
|
05bba0 |
|
|
|
05bba0 |
Message-id: <1434212556-3927-13-git-send-email-mreitz@redhat.com>
|
|
|
05bba0 |
Patchwork-id: 66031
|
|
|
05bba0 |
O-Subject: [RHEL-7.2 qemu-kvm PATCH 12/42] qcow2: fix leak of Qcow2DiscardRegion in update_refcount_discard
|
|
|
05bba0 |
Bugzilla: 1129893
|
|
|
05bba0 |
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
|
|
|
05bba0 |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
05bba0 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
05bba0 |
|
|
|
05bba0 |
From: Zhang Haoyu <zhanghy@sangfor.com>
|
|
|
05bba0 |
|
|
|
05bba0 |
BZ: 1129893
|
|
|
05bba0 |
|
|
|
05bba0 |
When the Qcow2DiscardRegion is adjacent to another one referenced by "d",
|
|
|
05bba0 |
free this Qcow2DiscardRegion metadata referenced by "p" after
|
|
|
05bba0 |
it was removed from s->discards queue.
|
|
|
05bba0 |
|
|
|
05bba0 |
Signed-off-by: Zhang Haoyu <zhanghy@sangfor.com>
|
|
|
05bba0 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
05bba0 |
(cherry picked from commit d8bb71b6227366c188595b91c24a58c9b06e46dd)
|
|
|
05bba0 |
|
|
|
05bba0 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
05bba0 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
05bba0 |
---
|
|
|
05bba0 |
block/qcow2-refcount.c | 1 +
|
|
|
05bba0 |
1 file changed, 1 insertion(+)
|
|
|
05bba0 |
|
|
|
05bba0 |
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
|
|
|
05bba0 |
index e66d593..0c5a6ad 100644
|
|
|
05bba0 |
--- a/block/qcow2-refcount.c
|
|
|
05bba0 |
+++ b/block/qcow2-refcount.c
|
|
|
05bba0 |
@@ -509,6 +509,7 @@ found:
|
|
|
05bba0 |
QTAILQ_REMOVE(&s->discards, p, next);
|
|
|
05bba0 |
d->offset = MIN(d->offset, p->offset);
|
|
|
05bba0 |
d->bytes += p->bytes;
|
|
|
05bba0 |
+ g_free(p);
|
|
|
05bba0 |
}
|
|
|
05bba0 |
}
|
|
|
05bba0 |
|
|
|
05bba0 |
--
|
|
|
05bba0 |
1.8.3.1
|
|
|
05bba0 |
|