netfilter: xt_hashlimit: dl_seq_stop() fix
[safe/jmp/linux-2.6] / net / netfilter / xt_hashlimit.c
index 9e9c489..70d561a 100644 (file)
@@ -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);
 }