From d2aa6de7224552f648887950fec8c2f55629526d Mon Sep 17 00:00:00 2001 From: nulltoken Date: Wed, 3 Oct 2012 13:56:13 +0200 Subject: [PATCH] reflog: Make git_reflog_free() accept null param --- src/reflog.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.39.5