send_garp_run() allocated and populated a shash of struct lport_addresses, but it only freed some of the data. This fixes the problem.
CC: Chandra S Vejendla <csvej...@us.ibm.com> Reported-by: Ramu Ramamurthy <ramu.ramamur...@gmail.com> Fixes: 8439c2ebd823 ("ovn: Support for GARP for NAT IPs via localnet") Signed-off-by: Ben Pfaff <b...@ovn.org> --- ovn/controller/pinctrl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ovn/controller/pinctrl.c b/ovn/controller/pinctrl.c index 8bbc42d..bc5ec4f 100644 --- a/ovn/controller/pinctrl.c +++ b/ovn/controller/pinctrl.c @@ -1059,7 +1059,6 @@ send_garp_update(const struct sbrec_port_binding *binding_rec, } free(name); } - destroy_lport_addresses(laddrs); return; } @@ -1302,7 +1301,13 @@ send_garp_run(const struct ovsrec_bridge *br_int, const char *chassis_id, sset_destroy(&localnet_vifs); sset_destroy(&local_l3gw_ports); simap_destroy(&localnet_ofports); - shash_destroy_free_data(&nat_addresses); + + SHASH_FOR_EACH_SAFE (iter, next, &nat_addresses) { + struct lport_addresses *laddrs = iter->data; + destroy_lport_addresses(laddrs); + shash_delete(&nat_addresses, iter); + } + shash_destroy(&nat_addresses); } static void -- 2.1.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev