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>
This commit is contained in:
parent
6f190a0641
commit
0db65d624e
@ -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->page_cache = new_cache->page_cache;
|
||||||
cache->max_num_items = new_cache->max_num_items;
|
cache->max_num_items = new_cache->max_num_items;
|
||||||
cache->num_items = new_cache->num_items;
|
cache->num_items = new_cache->num_items;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user