]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: Free memory when confused 5532/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 13 Dec 2019 00:30:21 +0000 (19:30 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 13 Dec 2019 00:33:42 +0000 (19:33 -0500)
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 <sharpd@cumulusnetworks.com>
isisd/isis_pdu.c

index 71249cf658aa027f9590bcfb9a4daf57dc7df531..cc22aa5ffd8650d7da1b9b99d0afd436c940f470 100644 (file)
@@ -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,