mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 07:37:29 +00:00
lib: fix route map description memory leak
Route map entries are not getting a chance to call `description` string deallocation on shutdown or when the parent entry is destroyed, so lets add a code to handle this in the `route_map_index_delete` function. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
parent
4267c07425
commit
f095133583
@ -971,6 +971,9 @@ void route_map_index_delete(struct route_map_index *index, int notify)
|
|||||||
zlog_debug("Deleting route-map %s sequence %d",
|
zlog_debug("Deleting route-map %s sequence %d",
|
||||||
index->map->name, index->pref);
|
index->map->name, index->pref);
|
||||||
|
|
||||||
|
/* Free route map entry description. */
|
||||||
|
XFREE(MTYPE_TMP, index->description);
|
||||||
|
|
||||||
/* Free route map northbound hook contexts. */
|
/* Free route map northbound hook contexts. */
|
||||||
while ((rhc = TAILQ_FIRST(&index->rhclist)) != NULL)
|
while ((rhc = TAILQ_FIRST(&index->rhclist)) != NULL)
|
||||||
routemap_hook_context_free(rhc);
|
routemap_hook_context_free(rhc);
|
||||||
|
Loading…
Reference in New Issue
Block a user