Commit 2ad45213 by Brodie Rao

refs: handle NULL pointers passed to git_reference_iterator_free()

Signed-off-by: Brodie Rao <brodie@sf.io>
parent 32b7e84e
...@@ -724,6 +724,9 @@ int git_reference_next_name(const char **out, git_reference_iterator *iter) ...@@ -724,6 +724,9 @@ int git_reference_next_name(const char **out, git_reference_iterator *iter)
void git_reference_iterator_free(git_reference_iterator *iter) void git_reference_iterator_free(git_reference_iterator *iter)
{ {
if (iter == NULL)
return;
git_refdb_iterator_free(iter); git_refdb_iterator_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