net_sched: fix a memory leak in tc action
authorWANG Cong <xiyou.wangcong@gmail.com>
Mon, 4 Apr 2016 17:32:48 +0000 (10:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Apr 2016 20:04:29 +0000 (16:04 -0400)
Fixes: ddf97ccdd7cb ("net_sched: add network namespace support for tc actions")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/act_api.h

index 2a19fe1..03e322b 100644 (file)
@@ -135,6 +135,7 @@ void tcf_hashinfo_destroy(const struct tc_action_ops *ops,
 static inline void tc_action_net_exit(struct tc_action_net *tn)
 {
        tcf_hashinfo_destroy(tn->ops, tn->hinfo);
+       kfree(tn->hinfo);
 }
 
 int tcf_generic_walker(struct tc_action_net *tn, struct sk_buff *skb,