Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55e0d7cf authored by Eric Dumazet's avatar Eric Dumazet Committed by Patrick McHardy
Browse files

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: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent ef169150
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -879,6 +879,7 @@ static void dl_seq_stop(struct seq_file *s, void *v)
	struct xt_hashlimit_htable *htable = s->private;
	unsigned int *bucket = (unsigned int *)v;

	if (!IS_ERR(bucket))
		kfree(bucket);
	spin_unlock_bh(&htable->lock);
}