diff options
Diffstat (limited to 'src/cache.c')
-rw-r--r-- | src/cache.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cache.c b/src/cache.c index 6205ef8a9..afc7c5b3a 100644 --- a/src/cache.c +++ b/src/cache.c @@ -68,7 +68,10 @@ int git_cache_init(git_cache *cache) { memset(cache, 0, sizeof(*cache)); cache->map = git_oidmap_alloc(); - git_mutex_init(&cache->lock); + if (git_mutex_init(&cache->lock)) { + giterr_set(GITERR_OS, "Failed to initialize cache mutex"); + return -1; + } return 0; } |