From ebeae7d58dd686bdfc4ecd65a56e187c7acbbb86 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 12 Dec 2019 19:30:21 -0500 Subject: [PATCH] isisd: Free memory when confused When you call into lsp_update with confusion, the lsp is purged and we do not do anything with the created tlv's from parsing the incoming data. To prevent the tlv's from being leaked note confusion and delete the unneeded data. Fixes: #5496 Signed-off-by: Donald Sharp --- isisd/isis_pdu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index 71249cf658..cc22aa5ffd 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -1054,6 +1054,8 @@ dontcheckadj: circuit->rcv_stream, circuit->area, level, lsp_confusion); + if (lsp_confusion) + isis_free_tlvs(tlvs); tlvs = NULL; /* ii */ lsp_flood_or_update(lsp, NULL,