mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 22:21:37 +00:00
tree: prevent git_tree_entry_free() from segfaulting when being passed a NULL tree_entry
This commit is contained in:
parent
9f99c5de2e
commit
1c3edb3078
@ -140,6 +140,9 @@ static int tree_key_search(git_vector *entries, const char *filename, size_t fil
|
|||||||
|
|
||||||
void git_tree_entry_free(git_tree_entry *entry)
|
void git_tree_entry_free(git_tree_entry *entry)
|
||||||
{
|
{
|
||||||
|
if (entry == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
git__free(entry);
|
git__free(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user