aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-05-04 13:51:31 +0200
committerFabian Groffen <grobian@gentoo.org>2019-05-04 13:51:31 +0200
commit55a3b37772e4e4f70b3eaf76916f2b1450d26a6e (patch)
treec95279899b1f234ed2bf079458d850a00ffa2d2b
parentqkeyword: don't crash while processing an empty set (diff)
downloadportage-utils-55a3b377.tar.gz
portage-utils-55a3b377.tar.bz2
portage-utils-55a3b377.zip
libq/cache: probably fix crash from bug #684252#c22
Ensure we renew the local ebuild dir context after we found a problem with the previous directory Bug: https://bugs.gentoo.org/684252 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r--libq/cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libq/cache.c b/libq/cache.c
index 0dbf483..a8b4ede 100644
--- a/libq/cache.c
+++ b/libq/cache.c
@@ -163,8 +163,10 @@ cache_next_pkg(cache_cat_ctx *cat_ctx)
/* opening might fail if what we found wasn't a
* directory or something */
- if (ctx->ebuilddir_cat_ctx == NULL)
+ if (ctx->ebuilddir_cat_ctx == NULL) {
+ ctx->ebuilddir_pkg_ctx = NULL;
return NULL;
+ }
}
ret = q_vdb_next_pkg(ctx->ebuilddir_cat_ctx);