From d08113d694b9934a9207166b59f3d86fa50f07f2 Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Wed, 25 Feb 2015 22:32:52 -0800 Subject: [PATCH] datapath: Fix return of uninitialized variable. This commit fixes a return of uninitialized variable bug. The bug can cause failures of operations like flow_add. VMware-BZ: #1405810 Signed-off-by: Alex Wang Acked-by: Pravin B Shelar --- datapath/flow_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c index 34edcfe69..bdf343c79 100644 --- a/datapath/flow_netlink.c +++ b/datapath/flow_netlink.c @@ -1670,7 +1670,8 @@ static int validate_and_copy_set_tun(const struct nlattr *attr, struct sw_flow_key key; struct ovs_tunnel_info *tun_info; struct nlattr *a; - int err, start, opts_type; + int start, opts_type; + int err = 0; ovs_match_init(&match, &key, NULL); opts_type = ipv4_tun_from_nlattr(nla_data(attr), &match, false, log); -- 2.20.1