Commit c70713d6 by Etienne Samson

index: release the snapshot instead of freeing the index

Previously we would assert in index_free because the reader incrementation
would not be balanced. Release the snapshot normally, so the variable gets
decremented before the index is freed.
parent bc34cb63
...@@ -3550,7 +3550,7 @@ int git_index_snapshot_new(git_vector *snap, git_index *index) ...@@ -3550,7 +3550,7 @@ int git_index_snapshot_new(git_vector *snap, git_index *index)
error = git_vector_dup(snap, &index->entries, index->entries._cmp); error = git_vector_dup(snap, &index->entries, index->entries._cmp);
if (error < 0) if (error < 0)
git_index_free(index); git_index_snapshot_release(snap, index);
return error; return error;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment