Module: kamailio
Branch: master
Commit: 579853ec6d6f2237641da7d80099f3ba996d6806
URL:
https://github.com/kamailio/kamailio/commit/579853ec6d6f2237641da7d80099f3b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)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/579853ec6d6f2237641da7d80099f3b…
Patch:
https://github.com/kamailio/kamailio/commit/579853ec6d6f2237641da7d80099f3b…
---
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;