From: Pablo Neira Ayuso Date: Mon, 14 Jun 2021 12:05:09 +0000 (+0200) Subject: evaluate: add set to cache once X-Git-Tag: v1.0.0~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4971686bd77973310d20a5c700115f5d28e752d3;p=thirdparty%2Fnftables.git evaluate: add set to cache once 67d3969a7244 ("evaluate: add set to the cache") re-adds the set into the cache again. This bug was hidden behind 5ec5c706d993 ("cache: add hashtable cache for table") which broke set_evaluate() for anonymous sets. Phil reported a gcc compilation warning which uncovered this problem. Reported-by: Phil Sutter Fixes: 67d3969a7244 ("evaluate: add set to the cache") Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/evaluate.c b/src/evaluate.c index 5863fc82..4397bacf 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -3867,9 +3867,6 @@ static int set_evaluate(struct eval_ctx *ctx, struct set *set) } ctx->set = NULL; - if (set_cache_find(table, set->handle.set.name) == NULL) - set_cache_add(set_get(set), table); - return 0; }