]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net_sched: fix two more memory leaks in cls_tcindex
authorCong Wang <xiyou.wangcong@gmail.com>
Wed, 15 May 2019 13:02:00 +0000 (15:02 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 2 Jul 2019 12:12:48 +0000 (14:12 +0200)
commit11546ad01e21468f1dae7d8c3b4ef3bc8cf4886e
tree4688114510e32199344547af5a1b3a1c6e300a3a
parentfb6ad63b65dfa915e607ad5afe7ce611d1c04e98
net_sched: fix two more memory leaks in cls_tcindex

BugLink: https://bugs.launchpad.net/bugs/1825942
struct tcindex_filter_result contains two parts:
struct tcf_exts and struct tcf_result.

For the local variable 'cr', its exts part is never used but
initialized without being released properly on success path. So
just completely remove the exts part to fix this leak.

For the local variable 'new_filter_result', it is never properly
released if not used by 'r' on success path.

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>
(cherry picked from commit 1db817e75f5b9387b8db11e37d5f0624eb9223e0)
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
net/sched/cls_tcindex.c