mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 11:50:56 +00:00
Merge pull request #695 from nulltoken/topic/iterator_free_null_tolerant
iterator: prevent git_iterator_free() from segfaulting when being passed a NULL iterator
This commit is contained in:
commit
8f12d136c9
@ -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