aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch_init.c1
-rw-r--r--page_cache.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/arch_init.c b/arch_init.c
index 9f1a174d3a..23044c1d12 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -739,7 +739,6 @@ static void migration_end(void)
XBZRLE_cache_lock();
if (XBZRLE.cache) {
cache_fini(XBZRLE.cache);
- g_free(XBZRLE.cache);
g_free(XBZRLE.encoded_buf);
g_free(XBZRLE.current_buf);
XBZRLE.cache = NULL;
diff --git a/page_cache.c b/page_cache.c
index b033681a93..89bb1ec3a0 100644
--- a/page_cache.c
+++ b/page_cache.c
@@ -109,6 +109,7 @@ void cache_fini(PageCache *cache)
g_free(cache->page_cache);
cache->page_cache = NULL;
+ g_free(cache);
}
static size_t cache_get_cache_pos(const PageCache *cache,