openvswitch: Fix an error handling path in 'ovs_nla_init_match_and_action()'

All other error handling paths in this function go through the 'error'
label. This one should do the same.

Fixes: 9cc9a5cb17 ("datapath: Avoid using stack larger than 1024.")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Christophe JAILLET 2017-09-11 21:56:20 +02:00 committed by David S. Miller
parent 9c0827317f
commit 5829e62ac1

View File

@ -1112,7 +1112,8 @@ static int ovs_nla_init_match_and_action(struct net *net,
if (!a[OVS_FLOW_ATTR_KEY]) { if (!a[OVS_FLOW_ATTR_KEY]) {
OVS_NLERR(log, OVS_NLERR(log,
"Flow key attribute not present in set flow."); "Flow key attribute not present in set flow.");
return -EINVAL; error = -EINVAL;
goto error;
} }
*acts = get_flow_actions(net, a[OVS_FLOW_ATTR_ACTIONS], key, *acts = get_flow_actions(net, a[OVS_FLOW_ATTR_ACTIONS], key,