From 51511231bf73decabc2a08d513bed3e5bc30662a Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Thu, 7 Apr 2016 01:37:42 +0200 Subject: [PATCH] lib/repo.c: fix potential null pointer deref --- lib/repo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/repo.c b/lib/repo.c index 208ccd91..d2f3fc88 100644 --- a/lib/repo.c +++ b/lib/repo.c @@ -317,7 +317,7 @@ xbps_repo_open(struct xbps_handle *xhp, const char *url) /* * 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); if (stage == NULL) return repo;