Skip to content

Commit 63e6e11

Browse files
committed
isisd: Fix sadj memory leak
In some cases the sadj was directly dropped. Signed-off-by: Donald Sharp <[email protected]>
1 parent 57968e3 commit 63e6e11

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

isisd/isis_spf.c

+2
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,7 @@ static void spf_adj_get_reverse_metrics(struct isis_spftree *spftree)
12971297
if (lsp_adj == NULL || lsp_adj->hdr.rem_lifetime == 0) {
12981298
/* Delete one-way adjacency. */
12991299
listnode_delete(spftree->sadj_list, sadj);
1300+
isis_spf_adj_free(sadj);
13001301
continue;
13011302
}
13021303

@@ -1313,6 +1314,7 @@ static void spf_adj_get_reverse_metrics(struct isis_spftree *spftree)
13131314
if (args.reverse_metric == UINT32_MAX) {
13141315
/* Delete one-way adjacency. */
13151316
listnode_delete(spftree->sadj_list, sadj);
1317+
isis_spf_adj_free(sadj);
13161318
continue;
13171319
}
13181320
sadj->metric = args.reverse_metric;

0 commit comments

Comments
 (0)