提交 bd42b788 编写于 作者: J Jiri Pirko 提交者: David S. Miller

net: sched: cls_basic: fix error path in basic_change()

Signed-off-by: NJiri Pirko <jiri@resnulli.us>
Reviewed-by: NJohn Fastabend <john.r.fastabend@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0f6538c2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册