aboutsummaryrefslogtreecommitdiff
path: root/page_cache.c
diff options
context:
space:
mode:
authorOrit Wasserman <owasserm@redhat.com>2013-02-25 19:12:01 +0200
committerJuan Quintela <quintela@redhat.com>2013-03-11 13:32:03 +0100
commit0db65d624e0211a43c011579d6607a50d8f06082 (patch)
treeeef764888b1a841572c294b023be086440f89196 /page_cache.c
parent6f190a0641f5b06a462b62955c15c77b8fb3990c (diff)
downloadqemu-0db65d624e0211a43c011579d6607a50d8f06082.zip
qemu-0db65d624e0211a43c011579d6607a50d8f06082.tar.gz
qemu-0db65d624e0211a43c011579d6607a50d8f06082.tar.bz2
Fix page_cache leak in cache_resize
Signed-off-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'page_cache.c')
-rw-r--r--page_cache.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/page_cache.c b/page_cache.c
index ba5640b..748957b 100644
--- a/page_cache.c
+++ b/page_cache.c
@@ -208,6 +208,7 @@ int64_t cache_resize(PageCache *cache, int64_t new_num_pages)
}
}
+ g_free(cache->page_cache);
cache->page_cache = new_cache->page_cache;
cache->max_num_items = new_cache->max_num_items;
cache->num_items = new_cache->num_items;