vendor/libgit2/src/sortedcache.c in rugged-0.24.0b4 vs vendor/libgit2/src/sortedcache.c in rugged-0.24.0b5
- old
+ new
@@ -18,11 +18,12 @@
GITERR_CHECK_ALLOC_ADD(&alloclen, sizeof(git_sortedcache), pathlen);
GITERR_CHECK_ALLOC_ADD(&alloclen, alloclen, 1);
sc = git__calloc(1, alloclen);
GITERR_CHECK_ALLOC(sc);
- if (git_pool_init(&sc->pool, 1, 0) < 0 ||
- git_vector_init(&sc->items, 4, item_cmp) < 0 ||
+ git_pool_init(&sc->pool, 1);
+
+ if (git_vector_init(&sc->items, 4, item_cmp) < 0 ||
git_strmap_alloc(&sc->map) < 0)
goto fail;
if (git_rwlock_init(&sc->lock)) {
giterr_set(GITERR_OS, "Failed to initialize lock");