Merge pull request #6681 from opensourcerouting/rmap-desc-leak-fix

lib: fix route map description memory leak
This commit is contained in:
Quentin Young 2020-07-06 13:05:59 -04:00 committed by GitHub
commit 4bcc4993b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);