Files
linux/net/sched
Cong Wang 7b3dbf958a net_sched: fix a resource leak in tcindex_set_parms()
[ Upstream commit 52b5ae501c ]

Jakub noticed there is a potential resource leak in
tcindex_set_parms(): when tcindex_filter_result_init() fails
and it jumps to 'errout1' which doesn't release the memory
and resources allocated by tcindex_alloc_perfect_hash().

We should just jump to 'errout_alloc' which calls
tcindex_free_perfect_hash().

Fixes: b9a24bb76b ("net_sched: properly handle failure case of tcf_exts_init()")
Reported-by: Jakub Kicinski <kuba@kernel.org>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-11 04:34:15 -08:00
..
2017-12-13 13:18:46 -05:00
2018-05-24 22:56:15 -04:00
2018-05-24 22:56:15 -04:00
2020-02-11 04:33:52 -08:00
2018-07-24 14:44:00 -07:00
2018-07-24 14:44:00 -07:00
2018-07-24 14:44:00 -07:00