summaryrefslogtreecommitdiff
path: root/src/reflog.c
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-10-03 13:56:13 +0200
committernulltoken <emeric.fermas@gmail.com>2012-10-26 21:02:00 +0200
commitd2aa6de7224552f648887950fec8c2f55629526d (patch)
treecbc8d49948ec1782b715cb4c9edf297b3d35917c /src/reflog.c
parentf7ae3f7531ab4afbcd88b190c7c267541dabb032 (diff)
downloadlibgit2-d2aa6de7224552f648887950fec8c2f55629526d.tar.gz
reflog: Make git_reflog_free() accept null param
Diffstat (limited to 'src/reflog.c')
-rw-r--r--src/reflog.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/reflog.c b/src/reflog.c
index a1ea7a27d..3c780cd1e 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);