diff options
Diffstat (limited to 'src/attrcache.c')
-rw-r--r-- | src/attrcache.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/attrcache.c b/src/attrcache.c index f02dd9d1d..47fb675e0 100644 --- a/src/attrcache.c +++ b/src/attrcache.c @@ -391,11 +391,10 @@ int git_attr_cache__init(git_repository *repo) * hashtable for attribute macros, and string pool */ if ((ret = git_strmap_new(&cache->files)) < 0 || - (ret = git_strmap_new(&cache->macros)) < 0) + (ret = git_strmap_new(&cache->macros)) < 0 || + (ret = git_pool_init(&cache->pool, 1)) < 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 */ |