config: handle NULL pointers passed to git_config_iterator_free()

Signed-off-by: Brodie Rao <brodie@sf.io>
This commit is contained in:
Brodie Rao 2014-01-12 23:30:06 -08:00
parent 9eb45fc51a
commit e3c6a1bf02

View File

@ -927,6 +927,9 @@ int git_config_next(git_config_entry **entry, git_config_iterator *iter)
void git_config_iterator_free(git_config_iterator *iter)
{
if (iter == NULL)
return;
iter->free(iter);
}