Skip to content

Commit

Permalink
ovn-northd: Fix memory leak in case of duplicate logical router port.
Browse files Browse the repository at this point in the history
'lrp_networks' must be destroyed on error path.

Fixes: 8e83e56 ("ovn: Support multiple addresses on a single logical router port.")
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Numan Siddique <numans@ovn.org>
  • Loading branch information
igsilya authored and numansiddique committed May 12, 2020
1 parent 3662b3c commit 129d5c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions northd/ovn-northd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 129d5c5

Please sign in to comment.