mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
net: sched: em_text: fix possible memory leak in em_text_destroy()
[ Upstream commit8fcb0382af
] m->data needs to be freed when em_text_destroy is called. Fixes:d675c989ed
("[PKT_SCHED]: Packet classification based on textsearch (ematch)") Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
83724831da
commit
5afbb60ffd
@ -101,8 +101,10 @@ retry:
|
||||
|
||||
static void em_text_destroy(struct tcf_ematch *m)
|
||||
{
|
||||
if (EM_TEXT_PRIV(m) && EM_TEXT_PRIV(m)->config)
|
||||
if (EM_TEXT_PRIV(m) && EM_TEXT_PRIV(m)->config) {
|
||||
textsearch_destroy(EM_TEXT_PRIV(m)->config);
|
||||
kfree(EM_TEXT_PRIV(m));
|
||||
}
|
||||
}
|
||||
|
||||
static int em_text_dump(struct sk_buff *skb, struct tcf_ematch *m)
|
||||
|
Loading…
Reference in New Issue
Block a user