mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 11:18:35 +00:00
Clean up some memory leaks
This commit is contained in:
parent
369b021733
commit
cdd71711ce
@ -1255,6 +1255,7 @@ static int opportunistic_updates(const git_remote *remote, git_vector *refs, con
|
|||||||
|
|
||||||
error = git_reference_create(&ref, remote->repo, refname.ptr, &head->oid, true, sig, msg);
|
error = git_reference_create(&ref, remote->repo, refname.ptr, &head->oid, true, sig, msg);
|
||||||
git_buf_free(&refname);
|
git_buf_free(&refname);
|
||||||
|
git_reference_free(ref);
|
||||||
|
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
|
@ -170,6 +170,8 @@ void test_index_cache__two_levels(void)
|
|||||||
tree_cache = git_tree_cache_get(index->tree, "subdir");
|
tree_cache = git_tree_cache_get(index->tree, "subdir");
|
||||||
cl_assert(tree_cache);
|
cl_assert(tree_cache);
|
||||||
cl_assert_equal_i(1, tree_cache->entry_count);
|
cl_assert_equal_i(1, tree_cache->entry_count);
|
||||||
|
|
||||||
|
git_index_free(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_index_cache__read_tree_children(void)
|
void test_index_cache__read_tree_children(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user