isisd: fix rcap tlv double-free crash (backport #16809) #16845
Closed
frrbot / frrbot
completed
Sep 17, 2024 in 30s
Style and/or linter errors found
Style and/or linter errors found
Details
Thanks for your contribution to FRR!
Click for style suggestions
diff --git a/isisd/isis_tlvs.c b/isisd/isis_tlvs.c
index 3237a8794..381465295 100644
--- a/isisd/isis_tlvs.c
+++ b/isisd/isis_tlvs.c
@@ -4404,8 +4404,8 @@ static int unpack_tlv_router_cap(enum isis_tlv_context context,
if (!tlvs->router_cap) {
/* First Router Capability TLV.
* Allocate router cap structure and initialize SR Algorithms */
- tlvs->router_cap = XCALLOC(MTYPE_ISIS_TLV,
- sizeof(struct isis_router_cap));
+ tlvs->router_cap =
+ XCALLOC(MTYPE_ISIS_TLV, sizeof(struct isis_router_cap));
for (int i = 0; i < SR_ALGORITHM_COUNT; i++)
tlvs->router_cap->algo[i] = SR_ALGORITHM_UNSET;
}
To apply the style suggestions:
curl https://gist.githubusercontent.com/polychaeta/2ad88e3414b0dcec079e138babb6ac52/raw/28f8f745293a98f915f3a26255ece07177645e48/style.diff | git apply -
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
Loading