mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 01:34:14 +08:00
netfilter: xt_hashlimit: dl_seq_stop() fix
If dl_seq_start() memory allocation fails, we crash later in dl_seq_stop(), trying to kfree(ERR_PTR(-ENOMEM)) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
ef1691504c
commit
55e0d7cf27
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user