summaryrefslogtreecommitdiff
path: root/src/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c
index 2f46cb041..2b47e4dc3 100644
--- a/src/index.c
+++ b/src/index.c
@@ -3510,7 +3510,7 @@ int git_index_snapshot_new(git_vector *snap, git_index *index)
error = git_vector_dup(snap, &index->entries, index->entries._cmp);
if (error < 0)
- git_index_free(index);
+ git_index_snapshot_release(snap, index);
return error;
}