diff options
| -rw-r--r-- | isisd/isis_redist.c | 13 | ||||
| -rw-r--r-- | isisd/isis_redist.h | 1 | ||||
| -rw-r--r-- | isisd/isisd.c | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c index e6c7a734bd..5714fa872a 100644 --- a/isisd/isis_redist.c +++ b/isisd/isis_redist.c @@ -380,6 +380,19 @@ static void isis_redist_update_zebra_subscriptions(struct isis *isis) } } +void isis_redist_free(struct isis *isis) +{ + int i; + + for (i = 0; i < REDIST_PROTOCOL_COUNT; i++) { + if (!isis->ext_info[i]) + continue; + + route_table_finish(isis->ext_info[i]); + isis->ext_info[i] = NULL; + } +} + void isis_redist_set(struct isis_area *area, int level, int family, int type, uint32_t metric, const char *routemap, int originate_type) { diff --git a/isisd/isis_redist.h b/isisd/isis_redist.h index 0d2dc6a803..afce922240 100644 --- a/isisd/isis_redist.h +++ b/isisd/isis_redist.h @@ -62,4 +62,5 @@ void isis_redist_set(struct isis_area *area, int level, int family, int type, uint32_t metric, const char *routemap, int originate_type); void isis_redist_unset(struct isis_area *area, int level, int family, int type); +void isis_redist_free(struct isis *isis); #endif diff --git a/isisd/isisd.c b/isisd/isisd.c index 668b60e385..950cdc281f 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -587,6 +587,7 @@ void isis_finish(struct isis *isis) isis_vrf_unlink(isis, vrf); } + isis_redist_free(isis); list_delete(&isis->area_list); list_delete(&isis->init_circ_list); XFREE(MTYPE_ISIS, isis); |
