From deed21b21e9d9cb0a05c3af5024fd27fd34720c8 Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Fri, 20 Nov 2020 01:17:17 +0100 Subject: [PATCH 09/16] ovn-controller: Fix leak of pending ct zones. shash contains pointers to the data that should be freed. Direct leak of 32 byte(s) in 2 object(s) allocated from: #0 0x52100f in malloc (/controller/ovn-controller+0x52100f) #1 0x752436 in xmalloc /lib/util.c:138:15 #2 0x5a2f0b in add_pending_ct_zone_entry /controller/ovn-controller.c:548:45 #3 0x5a2d1d in update_ct_zones /controller/ovn-controller.c:668:9 #4 0x59d8c6 in en_ct_zones_run /controller/ovn-controller.c:1495:5 #5 0x5dade4 in engine_run /lib/inc-proc-eng.c:377:9 #6 0x59adf4 in main /controller/ovn-controller.c #7 0x7f0799ef41a2 in __libc_start_main (/lib64/libc.so.6+0x271a2) CC: xu rong Fixes: 252e1642fb59 ("ovn-controller: pending_ct_zones should be destroyed") Acked-by: Dumitru Ceara Signed-off-by: Ilya Maximets Signed-off-by: Numan Siddique --- controller/ovn-controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c index 3b41cc390..e3cf855e7 100644 --- a/controller/ovn-controller.c +++ b/controller/ovn-controller.c @@ -1418,7 +1418,7 @@ en_ct_zones_cleanup(void *data) struct ed_type_ct_zones *ct_zones_data = data; simap_destroy(&ct_zones_data->current); - shash_destroy(&ct_zones_data->pending); + shash_destroy_free_data(&ct_zones_data->pending); } static void -- 2.28.0