Module: kamailio
Branch: master
Commit: 8d22d827d93f7fd5a9a29ee83d30c3b297c02241
URL:
https://github.com/kamailio/kamailio/commit/8d22d827d93f7fd5a9a29ee83d30c3b…
Author: Sergey Safarov <s.safarov(a)gmail.com>
Committer: Sergey Safarov <s.safarov(a)gmail.com>
Date: 2021-10-23T19:44:57+03:00
core: fixed route hash table cleanup
---
Modified: src/core/route.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8d22d827d93f7fd5a9a29ee83d30c3b…
Patch:
https://github.com/kamailio/kamailio/commit/8d22d827d93f7fd5a9a29ee83d30c3b…
---
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;