Commit 9eb45fc5 by Brodie Rao

branch: handle NULL pointers passed to git_branch_iterator_free()

Signed-off-by: Brodie Rao <brodie@sf.io>
parent 426d8456
...@@ -181,6 +181,9 @@ void git_branch_iterator_free(git_branch_iterator *_iter) ...@@ -181,6 +181,9 @@ void git_branch_iterator_free(git_branch_iterator *_iter)
{ {
branch_iter *iter = (branch_iter *) _iter; branch_iter *iter = (branch_iter *) _iter;
if (iter == NULL)
return;
git_reference_iterator_free(iter->iter); git_reference_iterator_free(iter->iter);
git__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