diff options
-rw-r--r-- | net/netfilter/nf_log.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index 8bb998fe098..beb37311e1a 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c | |||
@@ -36,10 +36,14 @@ static struct nf_logger *__find_logger(int pf, const char *str_logger) | |||
36 | int nf_log_register(u_int8_t pf, struct nf_logger *logger) | 36 | int nf_log_register(u_int8_t pf, struct nf_logger *logger) |
37 | { | 37 | { |
38 | const struct nf_logger *llog; | 38 | const struct nf_logger *llog; |
39 | int i; | ||
39 | 40 | ||
40 | if (pf >= ARRAY_SIZE(nf_loggers)) | 41 | if (pf >= ARRAY_SIZE(nf_loggers)) |
41 | return -EINVAL; | 42 | return -EINVAL; |
42 | 43 | ||
44 | for (i = 0; i < ARRAY_SIZE(logger->list); i++) | ||
45 | INIT_LIST_HEAD(&logger->list[i]); | ||
46 | |||
43 | mutex_lock(&nf_log_mutex); | 47 | mutex_lock(&nf_log_mutex); |
44 | 48 | ||
45 | if (pf == NFPROTO_UNSPEC) { | 49 | if (pf == NFPROTO_UNSPEC) { |