Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net_sched: fix a resource leak in tcindex_set_parms()
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: b9a24bb ("net_sched: properly handle failure case of tcf_exts_init()") Reported-by: Jakub Kicinski <[email protected]> Cc: Jamal Hadi Salim <[email protected]> Cc: Jiri Pirko <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information