summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util/disk_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index e38cacb259b..fde6e2e0974 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -1110,7 +1110,7 @@ disk_cache_get(struct disk_cache *cache, const cache_key key, size_t *size)
* TODO: pass the metadata back to the caller and do some basic
* validation.
*/
- cache_item_md_size += sizeof(cache_key);
+ cache_item_md_size += num_keys * sizeof(cache_key);
ret = lseek(fd, num_keys * sizeof(cache_key), SEEK_CUR);
if (ret == -1)
goto fail;