mirror of
https://git.proxmox.com/git/libgit2
synced 2025-10-15 21:48:20 +00:00
Merge pull request #1065 from nulltoken/fix/memory-leak
Fix memory leaks
This commit is contained in:
commit
e45423dd2c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user