netfilter: xt_hashlimit: fix a possible memory leak in htable_create()
authorTaehee Yoo <ap420073@gmail.com>
Fri, 16 Nov 2018 12:32:35 +0000 (21:32 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 08:24:33 +0000 (09:24 +0100)
commitfb0fc90cc20fdd857d30f4fbfa6bceecc99c5451
tree89e553cfe57b868f824c8390dc52dfaeff779f39
parentdf66ef67c3344b767b3d1d8396d4a3e81942c4e9
netfilter: xt_hashlimit: fix a possible memory leak in htable_create()

[ Upstream commit b4e955e9f372035361fbc6f07b21fe2cc6a5be4a ]

In the htable_create(), hinfo is allocated by vmalloc()
So that if error occurred, hinfo should be freed.

Fixes: 11d5f15723c9 ("netfilter: xt_hashlimit: Create revision 2 to support higher pps rates")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/xt_hashlimit.c