[ovs-dev] [PATCH ovn] ovn-northd: Fix memory leak in case of duplicate logical router port.

Ilya Maximets i.maximets at ovn.org
Tue May 12 10:46:18 UTC 2020


'lrp_networks' must be destroyed on error path.

Fixes: 8e83e561879a ("ovn: Support multiple addresses on a single logical router port.")
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
---
 northd/ovn-northd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 6f7d457a4..b25152d74 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -2129,6 +2129,7 @@ join_logical_ports(struct northd_context *ctx,
                             = VLOG_RATE_LIMIT_INIT(5, 1);
                         VLOG_WARN_RL(&rl, "duplicate logical router port %s",
                                      nbrp->name);
+                        destroy_lport_addresses(&lrp_networks);
                         continue;
                     }
                     ovn_port_set_nb(op, NULL, nbrp);
-- 
2.25.3



More information about the dev mailing list