Merge pull request #162 from ebfe/null-deref
lib/repo.c: fix potential null pointer deref
This commit is contained in:
commit
85f46ea295
@ -317,7 +317,7 @@ xbps_repo_open(struct xbps_handle *xhp, const char *url)
|
|||||||
/*
|
/*
|
||||||
* Load and merge staging repository if the repository is local.
|
* Load and merge staging repository if the repository is local.
|
||||||
*/
|
*/
|
||||||
if (!repo->is_remote) {
|
if (repo && !repo->is_remote) {
|
||||||
stage = xbps_repo_stage_open(xhp, url);
|
stage = xbps_repo_stage_open(xhp, url);
|
||||||
if (stage == NULL)
|
if (stage == NULL)
|
||||||
return repo;
|
return repo;
|
||||||
|
Loading…
Reference in New Issue
Block a user