summaryrefslogtreecommitdiff
path: root/src/pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pack.c')
-rw-r--r--src/pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pack.c b/src/pack.c
index cdd7e9e60..88af6afd4 100644
--- a/src/pack.c
+++ b/src/pack.c
@@ -92,8 +92,8 @@ static void cache_free(git_pack_cache *cache)
static int cache_init(git_pack_cache *cache)
{
- cache->entries = git_offmap_alloc();
- GIT_ERROR_CHECK_ALLOC(cache->entries);
+ if (git_offmap_new(&cache->entries) < 0)
+ return -1;
cache->memory_limit = GIT_PACK_CACHE_MEMORY_LIMIT;