summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2020-07-06 13:05:59 -0400
committerGitHub <noreply@github.com>2020-07-06 13:05:59 -0400
commit4bcc4993b11652f62a27ba4f42644bbd32dd8df9 (patch)
tree9c6ac0e995f150e36f36890f0ef0b839b2f3621e
parent007c1dd490dce9250cc1d849b25a02b5f3e6c590 (diff)
parentf0951335830203426074ddca4317f84b477e4afb (diff)
Merge pull request #6681 from opensourcerouting/rmap-desc-leak-fix
lib: fix route map description memory leak
-rw-r--r--lib/routemap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/routemap.c b/lib/routemap.c
index 3d69a3495a..3b45133450 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -971,6 +971,9 @@ 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 entry description. */
+ XFREE(MTYPE_TMP, index->description);
+
/* Free route map northbound hook contexts. */
while ((rhc = TAILQ_FIRST(&index->rhclist)) != NULL)
routemap_hook_context_free(rhc);