From 02710ffdef3426438839b5e90dc00ecdece53a83 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 2 Aug 2022 11:51:37 -0700 Subject: [PATCH] cache: if the cache_table is NULL don't search it --- libpkgconf/cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libpkgconf/cache.c b/libpkgconf/cache.c index 673ac48..dc1c342 100644 --- a/libpkgconf/cache.c +++ b/libpkgconf/cache.c @@ -86,6 +86,9 @@ cache_dump(const pkgconf_client_t *client) pkgconf_pkg_t * pkgconf_cache_lookup(pkgconf_client_t *client, const char *id) { + if (client->cache_table == NULL) + return NULL; + pkgconf_pkg_t **pkg; pkg = bsearch(id, client->cache_table,