summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-12-18 15:48:17 -0800
committerRussell Belfer <rb@github.com>2012-12-18 15:48:17 -0800
commit9d8fa5379942e6dded14a9df053a69ebba136056 (patch)
treeea271f0be5732b817fdd3fef4373edfa4ca0f8d3
parent25fa3ae39c5d043832071aae4f47ea52b4c5f62d (diff)
parent3a6420f378bce074d55721ed0c13c97fa9f088c7 (diff)
downloadlibgit2-9d8fa5379942e6dded14a9df053a69ebba136056.tar.gz
Merge pull request #1158 from rick/i-do-not-think-this-means-what-you-think-it-means
don't deref before we've asserted
-rw-r--r--src/reflog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reflog.c b/src/reflog.c
index df799b113..275622997 100644
--- a/src/reflog.c
+++ b/src/reflog.c
@@ -208,10 +208,10 @@ int git_reflog_read(git_reflog **reflog, const git_reference *ref)
git_buf log_file = GIT_BUF_INIT;
git_reflog *log = NULL;
- *reflog = NULL;
-
assert(reflog && ref);
+ *reflog = NULL;
+
if (reflog_init(&log, ref) < 0)
return -1;