[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200205.141308.466024249056448186.davem@davemloft.net>
Date: Wed, 05 Feb 2020 14:13:08 +0100 (CET)
From: David Miller <davem@...emloft.net>
To: xiyou.wangcong@...il.com
Cc: netdev@...r.kernel.org, kuba@...nel.org, jhs@...atatu.com,
jiri@...nulli.us
Subject: Re: [Patch net] net_sched: fix a resource leak in
tcindex_set_parms()
From: Cong Wang <xiyou.wangcong@...il.com>
Date: Tue, 4 Feb 2020 11:10:12 -0800
> 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: b9a24bb76bf6 ("net_sched: properly handle failure case of tcf_exts_init()")
> Reported-by: Jakub Kicinski <kuba@...nel.org>
> Cc: Jamal Hadi Salim <jhs@...atatu.com>
> Cc: Jiri Pirko <jiri@...nulli.us>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
Applied and queued up for -stable.
Powered by blists - more mailing lists