mirror of
https://git.proxmox.com/git/libgit2
synced 2025-11-02 15:56:54 +00:00
iterator: prevent git_iterator_free() from segfaulting when being passed a NULL iterator
This commit is contained in:
parent
b72969e064
commit
87fe3507bb
@ -71,6 +71,9 @@ GIT_INLINE(int) git_iterator_reset(git_iterator *iter)
|
||||
|
||||
GIT_INLINE(void) git_iterator_free(git_iterator *iter)
|
||||
{
|
||||
if (iter == NULL)
|
||||
return;
|
||||
|
||||
iter->free(iter);
|
||||
git__free(iter);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user