It was apparently possible for lrp_addr_s to be uninitialized in a logical
router with no ports.

Found by Coverity.

Reported-at: 
https://scan3.coverity.com/reports.htm#v16889/p10449/fileInstanceId=14763080&defectInstanceId=4304818&mergedDefectId=180426
Signed-off-by: Ben Pfaff <b...@ovn.org>
---
 ovn/northd/ovn-northd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index 83db75338557..94bbe7c489b7 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -3856,7 +3856,7 @@ build_static_route_flow(struct hmap *lflows, struct 
ovn_datapath *od,
                         const struct nbrec_logical_router_static_route *route)
 {
     ovs_be32 nexthop;
-    const char *lrp_addr_s;
+    const char *lrp_addr_s = NULL;
     unsigned int plen;
     bool is_ipv4;
 
-- 
2.10.2

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to