reflog: Make git_reflog_free() accept null param
diff --git a/src/reflog.c b/src/reflog.c
index a1ea7a2..3c780cd 100644
--- a/src/reflog.c
+++ b/src/reflog.c
@@ -166,6 +166,9 @@ void git_reflog_free(git_reflog *reflog)
unsigned int i;
git_reflog_entry *entry;
+ if (reflog == NULL)
+ return;
+
for (i=0; i < reflog->entries.length; i++) {
entry = git_vector_get(&reflog->entries, i);