From: Christophe JAILLET Date: Mon, 11 Sep 2017 19:56:20 +0000 (+0200) Subject: openvswitch: Fix an error handling path in 'ovs_nla_init_match_and_action()' X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~6924^2~28 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=5829e62ac17a40ab08c1b905565604a4b5fa7af6;p=mirror_ubuntu-focal-kernel.git 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: 9cc9a5cb176c ("datapath: Avoid using stack larger than 1024.") Signed-off-by: Christophe JAILLET Acked-by: Pravin B Shelar Signed-off-by: David S. Miller --- diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 76cf273a56c7..c3aec6227c91 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -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,