mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 17:12:51 +00:00
submodule: Fix memory leaks
This commit is contained in:
parent
3a025b97ff
commit
b3a559ddce
@ -798,7 +798,7 @@ static void submodule_update_from_head_data(
|
|||||||
static int submodule_update_head(git_submodule *submodule)
|
static int submodule_update_head(git_submodule *submodule)
|
||||||
{
|
{
|
||||||
git_tree *head = NULL;
|
git_tree *head = NULL;
|
||||||
git_tree_entry *te;
|
git_tree_entry *te = NULL;
|
||||||
|
|
||||||
submodule->flags = submodule->flags &
|
submodule->flags = submodule->flags &
|
||||||
~(GIT_SUBMODULE_STATUS_IN_HEAD |
|
~(GIT_SUBMODULE_STATUS_IN_HEAD |
|
||||||
@ -811,6 +811,7 @@ static int submodule_update_head(git_submodule *submodule)
|
|||||||
else
|
else
|
||||||
submodule_update_from_head_data(submodule, te->attr, &te->oid);
|
submodule_update_from_head_data(submodule, te->attr, &te->oid);
|
||||||
|
|
||||||
|
git_tree_entry_free(te);
|
||||||
git_tree_free(head);
|
git_tree_free(head);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user