Commit e45423dd by Ben Straub

Merge pull request #1065 from nulltoken/fix/memory-leak

Fix memory leaks
parents d51e54f1 4e547eee
......@@ -227,6 +227,7 @@ static int local_negotiate_fetch(
git_oid_cpy(&rhead->loid, git_object_id(obj));
else if (error != GIT_ENOTFOUND)
return error;
git_object_free(obj);
giterr_clear();
}
......
......@@ -52,6 +52,8 @@ void test_network_fetchlocal__partial(void)
cl_git_pass(git_remote_download(origin, transfer_cb, &callcount));
cl_git_pass(git_remote_update_tips(origin));
git_strarray_free(&refnames);
cl_git_pass(git_reference_list(&refnames, repo, GIT_REF_LISTALL));
cl_assert_equal_i(19, refnames.count); /* 18 remote + 1 local */
cl_assert(callcount > 0);
......
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