Commit 2f77d8f1 by Russell Belfer

Fix some memory leaks

parent 596b121a
...@@ -2030,6 +2030,8 @@ int git_index_read_tree(git_index *index, const git_tree *tree) ...@@ -2030,6 +2030,8 @@ int git_index_read_tree(git_index *index, const git_tree *tree)
error = git_tree_walk(tree, GIT_TREEWALK_POST, read_tree_cb, &data); error = git_tree_walk(tree, GIT_TREEWALK_POST, read_tree_cb, &data);
index_entries_free(&entries); index_entries_free(&entries);
git_vector_free(&entries);
git_vector_sort(&index->entries); git_vector_sort(&index->entries);
return error; return error;
......
...@@ -1267,8 +1267,10 @@ static int rename_remote_references( ...@@ -1267,8 +1267,10 @@ static int rename_remote_references(
return -1; return -1;
while ((error = git_reference_next(&ref, iter)) == 0) { while ((error = git_reference_next(&ref, iter)) == 0) {
if (git__prefixcmp(ref->name, GIT_REFS_REMOTES_DIR)) if (git__prefixcmp(ref->name, GIT_REFS_REMOTES_DIR)) {
git_reference_free(ref);
continue; continue;
}
if ((error = rename_one_remote_reference(ref, old_name, new_name)) < 0) { if ((error = rename_one_remote_reference(ref, old_name, new_name)) < 0) {
git_reference_iterator_free(iter); git_reference_iterator_free(iter);
......
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