Commit 8f12d136 by Russell Belfer

Merge pull request #695 from nulltoken/topic/iterator_free_null_tolerant

iterator: prevent git_iterator_free() from segfaulting when being passed a NULL iterator
parents b72969e0 87fe3507
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment