]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/netfilter/xt_hashlimit.c
netfilter: ip6table_raw: fix table priority
[mirror_ubuntu-bionic-kernel.git] / net / netfilter / xt_hashlimit.c
index d952806b64690f3a46756b6025d170bdd002764d..70d561a2d9e0d0ef98da7d1699ff7609d6b672bd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *     xt_hashlimit - Netfilter module to limit the number of packets per time
- *     seperately for each hashbucket (sourceip/sourceport/dstip/dstport)
+ *     separately for each hashbucket (sourceip/sourceport/dstip/dstport)
  *
  *     (C) 2003-2004 by Harald Welte <laforge@netfilter.org>
  *     Copyright © CC Computer Consultants GmbH, 2007 - 2008
@@ -879,7 +879,8 @@ static void dl_seq_stop(struct seq_file *s, void *v)
        struct xt_hashlimit_htable *htable = s->private;
        unsigned int *bucket = (unsigned int *)v;
 
-       kfree(bucket);
+       if (!IS_ERR(bucket))
+               kfree(bucket);
        spin_unlock_bh(&htable->lock);
 }