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