Module: kamailio Branch: master Commit: 579853ec6d6f2237641da7d80099f3ba996d6806 URL: https://github.com/kamailio/kamailio/commit/579853ec6d6f2237641da7d80099f3ba...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: GitHub noreply@github.com Date: 2021-11-03T12:58:14+01:00
Merge pull request #2896 from sergey-safarov/GH2892
core: fixed route hash table cleanup
---
Modified: src/core/route.c
---
Diff: https://github.com/kamailio/kamailio/commit/579853ec6d6f2237641da7d80099f3ba... Patch: https://github.com/kamailio/kamailio/commit/579853ec6d6f2237641da7d80099f3ba...
---
diff --git a/src/core/route.c b/src/core/route.c index ad2fa66e64..f520804312 100644 --- a/src/core/route.c +++ b/src/core/route.c @@ -91,8 +91,11 @@ inline static void destroy_rlist(struct route_list* rt) rt->entries=0; } if (rt->names.table){ - clist_foreach_safe(rt->names.table, e, tmp, next){ - pkg_free(e); + int i; + for(i = 0; i < RT_HASH_SIZE; i++) { + clist_foreach_safe(&rt->names.table[i], e, tmp, next) { + pkg_free(e); + } } pkg_free(rt->names.table); rt->names.table=0;