summaryrefslogtreecommitdiff
path: root/src/attrcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/attrcache.c')
-rw-r--r--src/attrcache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/attrcache.c b/src/attrcache.c
index 5bc260460..a57110684 100644
--- a/src/attrcache.c
+++ b/src/attrcache.c
@@ -388,10 +388,11 @@ int git_attr_cache__do_init(git_repository *repo)
* hashtable for attribute macros, and string pool
*/
if ((ret = git_strmap_alloc(&cache->files)) < 0 ||
- (ret = git_strmap_alloc(&cache->macros)) < 0 ||
- (ret = git_pool_init(&cache->pool, 1, 0)) < 0)
+ (ret = git_strmap_alloc(&cache->macros)) < 0)
goto cancel;
+ git_pool_init(&cache->pool, 1);
+
cache = git__compare_and_swap(&repo->attrcache, NULL, cache);
if (cache)
goto cancel; /* raced with another thread, free this but no error */