datapath: Fix return of uninitialized variable.
authorAlex Wang <alexw@nicira.com>
Thu, 26 Feb 2015 06:32:52 +0000 (22:32 -0800)
committerAlex Wang <alexw@nicira.com>
Thu, 26 Feb 2015 17:30:13 +0000 (09:30 -0800)
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 <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
datapath/flow_netlink.c

index 34edcfe..bdf343c 100644 (file)
@@ -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);