summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrodie Rao <brodie@sf.io>2014-01-12 23:30:06 -0800
committerBrodie Rao <brodie@sf.io>2014-01-12 23:33:56 -0800
commite3c6a1bf02227cf996a5c0da784124ddea5c1ba6 (patch)
tree950581cbce1ffddc1fe8a6c584dda0d59375ccec
parent9eb45fc51a55fb8b058a28b5ee1e297991fedca5 (diff)
downloadlibgit2-e3c6a1bf02227cf996a5c0da784124ddea5c1ba6.tar.gz
config: handle NULL pointers passed to git_config_iterator_free()
Signed-off-by: Brodie Rao <brodie@sf.io>
-rw-r--r--src/config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index 056a6ae13..b8d78c23b 100644
--- a/src/config.c
+++ b/src/config.c
@@ -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);
}