From 8c48ff71cfea85cfef9dbfba9b10f15bdd7f1899 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 22 Oct 2020 20:51:24 -0400 Subject: [PATCH] isisd: Fix memory leak on shutdown ==935465== 40 bytes in 1 blocks are definitely lost in loss record 71 of 546 ==935465== at 0x483AB65: calloc (vg_replace_malloc.c:760) ==935465== by 0x48D6611: qcalloc (memory.c:110) ==935465== by 0x48CFE02: list_new (linklist.c:32) ==935465== by 0x15DBF0: isis_new (isisd.c:213) ==935465== by 0x15DAC4: isis_global_instance_create (isisd.c:179) ==935465== by 0x121892: main (isis_main.c:264) ==935465== 64 (40 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss record 101 of 546 ==935465== at 0x483AB65: calloc (vg_replace_malloc.c:760) ==935465== by 0x48D6611: qcalloc (memory.c:110) ==935465== by 0x48CFE02: list_new (linklist.c:32) ==935465== by 0x15DBE3: isis_new (isisd.c:212) ==935465== by 0x15DAC4: isis_global_instance_create (isisd.c:179) ==935465== by 0x121892: main (isis_main.c:264) On isis shutdown we are seeing the above memory leaks. Modify the code to start cleaning this up. Signed-off-by: Donald Sharp --- isisd/isisd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/isisd/isisd.c b/isisd/isisd.c index 2ffc393d40..e33fae4231 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -581,6 +581,8 @@ void isis_finish(struct isis *isis) isis_vrf_unlink(isis, vrf); } + list_delete(&isis->area_list); + list_delete(&isis->init_circ_list); XFREE(MTYPE_ISIS, isis); } -- 2.39.5