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 <nobody@nowhere.ws>
diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c
index abb9ecd..690ae47 100644
--- a/isisd/isis_redist.c
+++ b/isisd/isis_redist.c
@@ -176,6 +176,7 @@
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_uninstall(area, level, p);
}
+ XFREE(MTYPE_ISIS, ei_node->info);
route_unlock_node(ei_node);
}
@@ -502,6 +504,7 @@
continue;
}
+ XFREE(MTYPE_ISIS, rn->info);
route_unlock_node(rn);
}