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:28:49 +0000 (09:28 +0100)
commitf500a4ef7e5d7feddee380edfb1a1d91fc8fa627
tree660cecbe2e61bb0f1325bc85fd49242ca795b747
parentaa17c9c00ce006de2dd7b0eabed9e45b48d3d044
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