isisd: Add free func for Sub-Sub-TLVs in general

Add a function to free all the Sub-Sub-TLVs and the `isis_subsubtlvs`
data structure passed as an argument.

At this time, this function only frees the `isis_subsubtlvs`. It does
not free any specific Sub-Sub-TLVs because no Sub-Sub-TLVs have been
defined yet. This function will be extended in future commits to free
specific Sub-Sub-TLVs, as they become supported.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
This commit is contained in:
Carmine Scarpitta 2023-02-17 23:27:07 +01:00
parent 28354d6f38
commit ac62420870

View File

@ -2006,6 +2006,14 @@ static void isis_format_subsubtlvs(struct isis_subsubtlvs *subsubtlvs,
{
}
static void isis_free_subsubtlvs(struct isis_subsubtlvs *subsubtlvs)
{
if (!subsubtlvs)
return;
XFREE(MTYPE_ISIS_SUBSUBTLV, subsubtlvs);
}
/* Functions related to subtlvs */
static struct isis_subtlvs *isis_alloc_subtlvs(enum isis_tlv_context context)