From 519929cdd47ac4d9f7f33e13922e1a063f69bb24 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 20 Jul 2022 16:49:09 -0400 Subject: [PATCH] isisd: Ensure rcap is freed in error case unpack_tlv_router_cap allocates memory that in the error case is not being freed. Signed-off-by: Donald Sharp --- isisd/isis_tlvs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/isisd/isis_tlvs.c b/isisd/isis_tlvs.c index f1aae7caf107..dad271225b3d 100644 --- a/isisd/isis_tlvs.c +++ b/isisd/isis_tlvs.c @@ -2966,9 +2966,9 @@ static int pack_tlv_router_cap(const struct isis_router_cap *router_cap, } static int unpack_tlv_router_cap(enum isis_tlv_context context, - uint8_t tlv_type, uint8_t tlv_len, - struct stream *s, struct sbuf *log, - void *dest, int indent) + uint8_t tlv_type, uint8_t tlv_len, + struct stream *s, struct sbuf *log, void *dest, + int indent) { struct isis_tlvs *tlvs = dest; struct isis_router_cap *rcap; @@ -3013,7 +3013,7 @@ static int unpack_tlv_router_cap(enum isis_tlv_context context, log, indent, "WARNING: Router Capability subTLV length too large compared to expected size\n"); stream_forward_getp(s, STREAM_READABLE(s)); - + XFREE(MTYPE_ISIS_TLV, rcap); return 0; }