vendor/libgit2/src/sortedcache.c in rugged-1.0.1 vs vendor/libgit2/src/sortedcache.c in rugged-1.1.0
- old
+ new
@@ -23,12 +23,11 @@
GIT_ERROR_CHECK_ALLOC_ADD(&alloclen, sizeof(git_sortedcache), pathlen);
GIT_ERROR_CHECK_ALLOC_ADD(&alloclen, alloclen, 1);
sc = git__calloc(1, alloclen);
GIT_ERROR_CHECK_ALLOC(sc);
- git_pool_init(&sc->pool, 1);
-
- if (git_vector_init(&sc->items, 4, item_cmp) < 0 ||
+ if (git_pool_init(&sc->pool, 1) < 0 ||
+ git_vector_init(&sc->items, 4, item_cmp) < 0 ||
git_strmap_new(&sc->map) < 0)
goto fail;
if (git_rwlock_init(&sc->lock)) {
git_error_set(GIT_ERROR_OS, "failed to initialize lock");