mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 17:12:06 +00:00
net: sched: cls_basic: fix error path in basic_change()
Signed-off-by: Jiri Pirko <jiri@resnulli.us> Reviewed-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0f6538c271
commit
bd42b78860
@ -178,10 +178,9 @@ static int basic_change(struct net *net, struct sk_buff *in_skb,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
err = -ENOBUFS;
|
||||
fnew = kzalloc(sizeof(*fnew), GFP_KERNEL);
|
||||
if (fnew == NULL)
|
||||
goto errout;
|
||||
if (!fnew)
|
||||
return -ENOBUFS;
|
||||
|
||||
tcf_exts_init(&fnew->exts, TCA_BASIC_ACT, TCA_BASIC_POLICE);
|
||||
err = -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user