From: Ramu Ramamurthy <ramu.ramamur...@us.ibm.com>

This commit fixes the following leak found by check-valgrind in the test:
"send gratuitous arp for nat ips in localnet"

sset gets allocated but not destroyed.

valgrind.14154-==14157== 1,892 bytes in 44 blocks are definitely lost in loss 
record 176 of 180
valgrind.14154-==14157==    at 0x4C29BFD: malloc (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
valgrind.14154-==14157==    by 0x48E1E7: xmalloc (util.c:112)
valgrind.14154-==14157==    by 0x487EDC: sset_add__ (sset.c:51)
valgrind.14154-==14157==    by 0x411A46: get_nat_addresses_and_keys 
(pinctrl.c:1231)
valgrind.14154-==14157==    by 0x411A46: send_garp_run (pinctrl.c:1260)
valgrind.14154-==14157==    by 0x411A46: pinctrl_run (pinctrl.c:787)
valgrind.14154:==14157==    by 0x407ABE: main (ovn-controller.c:451)

Signed-off-by: Ramu Ramamurthy <ramu.ramamur...@us.ibm.com>
---
 ovn/controller/pinctrl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ovn/controller/pinctrl.c b/ovn/controller/pinctrl.c
index 8bbc42d..358602a 100644
--- a/ovn/controller/pinctrl.c
+++ b/ovn/controller/pinctrl.c
@@ -1303,6 +1303,7 @@ send_garp_run(const struct ovsrec_bridge *br_int, const 
char *chassis_id,
     sset_destroy(&local_l3gw_ports);
     simap_destroy(&localnet_ofports);
     shash_destroy_free_data(&nat_addresses);
+    sset_destroy(&nat_ip_keys);
 }
 
 static void
-- 
1.8.3.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to