Message ID | 20240221112637.5396-3-fw@strlen.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 79578be4d35c842a802487e2f31c2aed80cc005f |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next,01/12] netfilter: expect: Simplify the allocation of slab caches in nf_conntrack_expect_init | expand |
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index e16f158388bb..e0bfeb75766f 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c @@ -31,10 +31,10 @@ static struct nf_logger *__find_logger(int pf, const char *str_logger) int i; for (i = 0; i < NF_LOG_TYPE_MAX; i++) { - if (loggers[pf][i] == NULL) + log = nft_log_dereference(loggers[pf][i]); + if (!log) continue; - log = nft_log_dereference(loggers[pf][i]); if (!strncasecmp(str_logger, log->name, strlen(log->name))) return log; }