aboutsummaryrefslogtreecommitdiff
path: root/page_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'page_cache.c')
-rw-r--r--page_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/page_cache.c b/page_cache.c
index 809dadc7eb..938a79c9ea 100644
--- a/page_cache.c
+++ b/page_cache.c
@@ -159,7 +159,7 @@ void cache_insert(PageCache *cache, uint64_t addr, uint8_t *pdata)
cache->num_items++;
}
- it->it_data = pdata;
+ it->it_data = g_memdup(pdata, cache->page_size);
it->it_age = ++cache->max_item_age;
it->it_addr = addr;
}