diff options
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c index 907bd6d93..3cae40534 100644 --- a/src/index.c +++ b/src/index.c @@ -411,7 +411,8 @@ int git_index_open(git_index **index_out, const char *index_path) index = git__calloc(1, sizeof(git_index)); GIT_ERROR_CHECK_ALLOC(index); - git_pool_init(&index->tree_pool, 1); + if (git_pool_init(&index->tree_pool, 1) < 0) + goto fail; if (index_path != NULL) { index->index_file_path = git__strdup(index_path); |