aboutsummaryrefslogtreecommitdiff
path: root/quse.c
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2020-05-16 16:18:39 +0200
committerFabian Groffen <grobian@gentoo.org>2020-05-16 16:18:39 +0200
commit36a1c566e177e8af5d05b5406b8834d299652173 (patch)
tree029aeb492da762d5ac55f70c6a9e4257809a43ea /quse.c
parentqatom: add -s switch to strictly emulate a call to atom_compare (diff)
downloadportage-utils-36a1c566e177e8af5d05b5406b8834d299652173.tar.gz
portage-utils-36a1c566e177e8af5d05b5406b8834d299652173.tar.bz2
portage-utils-36a1c566e177e8af5d05b5406b8834d299652173.zip
quse: Coverity rightly pointed out state->match may be NULL
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'quse.c')
-rw-r--r--quse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/quse.c b/quse.c
index 1e39ce0..5105638 100644
--- a/quse.c
+++ b/quse.c
@@ -141,7 +141,8 @@ quse_search_use_local_desc(int portdirfd, struct quse_state *state)
continue;
atom->REPO = (char *)state->repo;
- atom->SLOT = state->match->SLOT; /* fake match */
+ if (state->match != NULL)
+ atom->SLOT = state->match->SLOT; /* fake match */
if (state->match == NULL ||
atom_compare(atom, state->match) == EQUAL)
{