mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 15:33:51 +00:00
branch: handle NULL pointers passed to git_branch_iterator_free()
Signed-off-by: Brodie Rao <brodie@sf.io>
This commit is contained in:
parent
426d8456ea
commit
9eb45fc51a
@ -181,6 +181,9 @@ void git_branch_iterator_free(git_branch_iterator *_iter)
|
||||
{
|
||||
branch_iter *iter = (branch_iter *) _iter;
|
||||
|
||||
if (iter == NULL)
|
||||
return;
|
||||
|
||||
git_reference_iterator_free(iter->iter);
|
||||
git__free(iter);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user