Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21641c2e authored by WANG Cong's avatar WANG Cong Committed by David S. Miller
Browse files

net_sched: check NULL on error path in route4_change()



On error path in route4_change(), 'f' could be NULL,
so we should check NULL before calling tcf_exts_destroy().

Fixes: b9a24bb7 ("net_sched: properly handle failure case of tcf_exts_init()")
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d6989d4b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -559,6 +559,7 @@ static int route4_change(struct net *net, struct sk_buff *in_skb,
	return 0;

errout:
	if (f)
		tcf_exts_destroy(&f->exts);
	kfree(f);
	return err;