From a5c63cea79a20f0fa471977baf997fb75a56ea7d Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Sun, 3 Apr 2016 12:46:25 -0300 Subject: [PATCH] isisd: work around route table asserts for deleting node with info The route table code in lib/table.c triggers an assertion when a route node with rn->info != NULL reaches refcount 0, probably to avoid memleaks. In this particular case, this is not an issue, since the info will be freed by the destructor. However, since removing this assertion probably requires more discussion, just make sure that rn->info gets freed and unset before its refcount is decremented to zero. Signed-off-by: Christian Franke --- isisd/isis_redist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c index abb9ecd409..690ae4720c 100644 --- a/isisd/isis_redist.c +++ b/isisd/isis_redist.c @@ -176,6 +176,7 @@ isis_redist_uninstall(struct isis_area *area, int level, struct prefix *p) if (!er_node->info) return; + XFREE(MTYPE_ISIS, er_node->info); route_unlock_node(er_node); lsp_regenerate_schedule(area, level, 0); } @@ -358,6 +359,7 @@ isis_redist_delete(int type, struct prefix *p) isis_redist_uninstall(area, level, p); } + XFREE(MTYPE_ISIS, ei_node->info); route_unlock_node(ei_node); } @@ -502,6 +504,7 @@ isis_redist_unset(struct isis_area *area, int level, continue; } + XFREE(MTYPE_ISIS, rn->info); route_unlock_node(rn); } -- 2.39.5