mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 22:39:38 +00:00
refdb_fs: remove unnecessary check for NULL
The fail-label of `reflog_parse` explicitly checks the entry poitner for NULL before freeing it. When we jump to the label the variable has to be set to a non-NULL and valid pointer though: if the allocation fails we immediately return with an error code and if the loop was not entered we return with a success code, withouth executing the label's code. Remove the useless NULL-check to silence Coverity.
This commit is contained in:
parent
be8479c987
commit
793e085536
@ -1512,7 +1512,6 @@ static int reflog_parse(git_reflog *log, const char *buf, size_t buf_size)
|
|||||||
#undef seek_forward
|
#undef seek_forward
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
if (entry)
|
|
||||||
git_reflog_entry__free(entry);
|
git_reflog_entry__free(entry);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user