|
|
357786 |
From b03c385c6eee5999f6aadcc516aa0f9fc882df47 Mon Sep 17 00:00:00 2001
|
|
|
357786 |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
|
|
357786 |
Date: Fri, 22 Jun 2018 18:59:58 +0200
|
|
|
357786 |
Subject: [PATCH 19/57] migration/block-dirty-bitmap: fix memory leak in
|
|
|
357786 |
dirty_bitmap_load_bits
|
|
|
357786 |
|
|
|
357786 |
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
357786 |
Message-id: <20180622190005.21297-12-dgilbert@redhat.com>
|
|
|
357786 |
Patchwork-id: 81009
|
|
|
357786 |
O-Subject: [RHEL7.6 qemu-kvm-rhev PATCH 11/18] migration/block-dirty-bitmap: fix memory leak in dirty_bitmap_load_bits
|
|
|
357786 |
Bugzilla: 1584139
|
|
|
357786 |
RH-Acked-by: Peter Xu <peterx@redhat.com>
|
|
|
357786 |
RH-Acked-by: Juan Quintela <quintela@redhat.com>
|
|
|
357786 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
357786 |
|
|
|
357786 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
|
357786 |
|
|
|
357786 |
Release buf on error path too.
|
|
|
357786 |
|
|
|
357786 |
Bug was introduced in b35ebdf076d697bc "migration: add postcopy
|
|
|
357786 |
migration of dirty bitmaps" with the whole function.
|
|
|
357786 |
|
|
|
357786 |
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
|
357786 |
Message-Id: <20180427142002.21930-3-vsementsov@virtuozzo.com>
|
|
|
357786 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
357786 |
CC: qemu-stable@nongnu.org
|
|
|
357786 |
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
357786 |
(cherry picked from commit 16a2227893dc1d5cad78ed376ad1d7e300978fbe)
|
|
|
357786 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
357786 |
---
|
|
|
357786 |
migration/block-dirty-bitmap.c | 1 +
|
|
|
357786 |
1 file changed, 1 insertion(+)
|
|
|
357786 |
|
|
|
357786 |
diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c
|
|
|
357786 |
index dd04f10..8819aab 100644
|
|
|
357786 |
--- a/migration/block-dirty-bitmap.c
|
|
|
357786 |
+++ b/migration/block-dirty-bitmap.c
|
|
|
357786 |
@@ -600,6 +600,7 @@ static int dirty_bitmap_load_bits(QEMUFile *f, DirtyBitmapLoadState *s)
|
|
|
357786 |
ret = qemu_get_buffer(f, buf, buf_size);
|
|
|
357786 |
if (ret != buf_size) {
|
|
|
357786 |
error_report("Failed to read bitmap bits");
|
|
|
357786 |
+ g_free(buf);
|
|
|
357786 |
return -EIO;
|
|
|
357786 |
}
|
|
|
357786 |
|
|
|
357786 |
--
|
|
|
357786 |
1.8.3.1
|
|
|
357786 |
|