diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-10-03 13:56:13 +0200 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-10-26 21:02:00 +0200 |
commit | d2aa6de7224552f648887950fec8c2f55629526d (patch) | |
tree | cbc8d49948ec1782b715cb4c9edf297b3d35917c /src/reflog.c | |
parent | f7ae3f7531ab4afbcd88b190c7c267541dabb032 (diff) | |
download | libgit2-d2aa6de7224552f648887950fec8c2f55629526d.tar.gz |
reflog: Make git_reflog_free() accept null param
Diffstat (limited to 'src/reflog.c')
-rw-r--r-- | src/reflog.c | 3 |
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); |