mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: b9a24bb76b ("net_sched: properly handle failure case of tcf_exts_init()")
Reported-by: kbuild test robot <[email protected]>
Cc: Jamal Hadi Salim <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Acked-by: Jamal Hadi Salim <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
d6989d4bbe
commit
21641c2e1f
1 changed files with 2 additions and 1 deletions
|
|
@ -559,7 +559,8 @@ static int route4_change(struct net *net, struct sk_buff *in_skb,
|
|||
return 0;
|
||||
|
||||
errout:
|
||||
tcf_exts_destroy(&f->exts);
|
||||
if (f)
|
||||
tcf_exts_destroy(&f->exts);
|
||||
kfree(f);
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue