diff options
author | Fabian Groffen <grobian@gentoo.org> | 2020-05-16 16:18:39 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2020-05-16 16:18:39 +0200 |
commit | 36a1c566e177e8af5d05b5406b8834d299652173 (patch) | |
tree | 029aeb492da762d5ac55f70c6a9e4257809a43ea /quse.c | |
parent | qatom: add -s switch to strictly emulate a call to atom_compare (diff) | |
download | portage-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) { |