Merge pull request #1158 from rick/i-do-not-think-this-means-what-you-think-it-means

don't deref before we've asserted
This commit is contained in:
Russell Belfer 2012-12-18 15:48:17 -08:00
commit 9d8fa53799

View File

@ -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;