From: Christian Franke Date: Sun, 3 Apr 2016 15:46:25 +0000 (-0300) Subject: isisd: work around route table asserts for deleting node with info X-Git-Tag: frr-2.0-rc1~989^2~5 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a5c63cea79a20f0fa471977baf997fb75a56ea7d;p=mirror%2Ffrr.git 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 --- 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); }