summaryrefslogtreecommitdiff
path: root/src/reflog.c
diff options
context:
space:
mode:
authorRick Bradley <rick@rickbradley.com>2012-12-18 17:46:18 -0600
committerRick Bradley <rick@rickbradley.com>2012-12-18 17:46:18 -0600
commit3a6420f378bce074d55721ed0c13c97fa9f088c7 (patch)
treeea271f0be5732b817fdd3fef4373edfa4ca0f8d3 /src/reflog.c
parent25fa3ae39c5d043832071aae4f47ea52b4c5f62d (diff)
downloadlibgit2-3a6420f378bce074d55721ed0c13c97fa9f088c7.tar.gz
don't deref before we've asserted
just sayin'.
Diffstat (limited to 'src/reflog.c')
-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;