This commit fixes a return of uninitialized variable bug.
The bug can cause failures of operations like flow_add.

Signed-off-by: Alex Wang <al...@nicira.com>
---
 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 34edcfe..bdf343c 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);
-- 
1.7.9.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to