]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: act_pedit: fix possible memory leak in tcf_pedit_init()
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 3 Jul 2018 13:45:12 +0000 (13:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Jul 2018 13:08:21 +0000 (22:08 +0900)
commit9c5be5b7067b2eb9e1a64d95dcfc838a85d2af12
treeb2af1a927062e3b97f8eceed5f4814e221dca0b1
parent12be020816e9da04ffb8203567d71c610ee6cf99
net: sched: act_pedit: fix possible memory leak in tcf_pedit_init()

'keys_ex' is malloced by tcf_pedit_keys_ex_parse() in tcf_pedit_init()
but not all of the error handle path free it, this may cause memory
leak. This patch fix it.

Fixes: 7f9a4c7f565e ("net/act_pedit: Support using offset relative to the conventional network headers")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_pedit.c