]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
openvswitch: Fix an error handling path in 'ovs_nla_init_match_and_action()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 11 Sep 2017 19:56:20 +0000 (21:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Sep 2017 03:37:31 +0000 (20:37 -0700)
All other error handling paths in this function go through the 'error'
label. This one should do the same.

Fixes: 9cc9a5cb176c ("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>
net/openvswitch/datapath.c

index 76cf273a56c791bbc84262811c2f35e94e024dcf..c3aec6227c91b776dd41c7c8f6a9b1d1e313aee4 100644 (file)
@@ -1112,7 +1112,8 @@ static int ovs_nla_init_match_and_action(struct net *net,
                if (!a[OVS_FLOW_ATTR_KEY]) {
                        OVS_NLERR(log,
                                  "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,