In function get_nat_addresses(), memory reserved for c_addresses is not
freed in case of distributed NAT (i.e., central_ip_address == false):
==22493== 36 bytes in 2 blocks are definitely lost in loss record 176
of 444
==22493== at 0x4C29DAD: malloc (vg_replace_malloc.c:308)
==22493== by 0x4C2C100: realloc (vg_replace_malloc.c:836)
==22493== by 0x4E3E9D: xrealloc (util.c:149)
==22493== by 0x47EEBB: ds_reserve (dynamic-string.c:63)
==22493== by 0x47F32E: ds_put_format_valist (dynamic-string.c:161)
==22493== by 0x47F258: ds_put_format (dynamic-string.c:142)
==22493== by 0x40D74E: get_nat_addresses (ovn-northd.c:2337)
==22493== by 0x40F75B: ovn_port_update_sbrec (ovn-northd.c:2981)
==22493== by 0x4112E8: build_ports (ovn-northd.c:3505)
==22493== by 0x42922C: ovnnb_db_run (ovn-northd.c:11138)
==22493== by 0x42A49D: ovn_db_run (ovn-northd.c:11692)
==22493== by 0x42B484: main (ovn-northd.c:12055)
To fix this we always call ds_destroy(&c_addresses).
Fixes: 7b1f4dabfb60 ("ovn: Gratuitous ARP for distributed NAT rules")
Signed-off-by: Dumitru Ceara <[email protected]>
---
northd/ovn-northd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index b25152d..965de05 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -2424,6 +2424,7 @@ get_nat_addresses(const struct ovn_port *op, size_t *n)
}
*n = n_nats;
+ ds_destroy(&c_addresses);
return addresses;
}
--
1.8.3.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev