mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-05 07:29:21 +00:00
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:
commit
9d8fa53799
@ -208,10 +208,10 @@ int git_reflog_read(git_reflog **reflog, const git_reference *ref)
|
|||||||
git_buf log_file = GIT_BUF_INIT;
|
git_buf log_file = GIT_BUF_INIT;
|
||||||
git_reflog *log = NULL;
|
git_reflog *log = NULL;
|
||||||
|
|
||||||
*reflog = NULL;
|
|
||||||
|
|
||||||
assert(reflog && ref);
|
assert(reflog && ref);
|
||||||
|
|
||||||
|
*reflog = NULL;
|
||||||
|
|
||||||
if (reflog_init(&log, ref) < 0)
|
if (reflog_init(&log, ref) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user