diff options
Diffstat (limited to 'lib/routemap.c')
| -rw-r--r-- | lib/routemap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/routemap.c b/lib/routemap.c index 5369fa771f..912cf28202 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -909,6 +909,7 @@ static struct route_map_index *route_map_index_new(void) new = XCALLOC(MTYPE_ROUTE_MAP_INDEX, sizeof(struct route_map_index)); new->exitpolicy = RMAP_EXIT; /* Default to Cisco-style */ + TAILQ_INIT(&new->rhclist); QOBJ_REG(new, route_map_index); return new; } @@ -924,6 +925,10 @@ void route_map_index_delete(struct route_map_index *index, int notify) zlog_debug("Deleting route-map %s sequence %d", index->map->name, index->pref); + /* Free route map northbound hook contexts. */ + while (!TAILQ_EMPTY(&index->rhclist)) + routemap_hook_context_free(TAILQ_FIRST(&index->rhclist)); + /* Free route match. */ while ((rule = index->match_list.head) != NULL) route_map_rule_delete(&index->match_list, rule); |
