diff --git a/src/cache.c b/src/cache.c index 8dc9cbf9c..2f3ad1563 100644 --- a/src/cache.c +++ b/src/cache.c @@ -68,6 +68,7 @@ int git_cache_init(git_cache *cache) { memset(cache, 0, sizeof(*cache)); cache->map = git_oidmap_alloc(); + GITERR_CHECK_ALLOC(cache->map); if (git_rwlock_init(&cache->lock)) { giterr_set(GITERR_OS, "Failed to initialize cache rwlock"); return -1;