Hello, We've noticed a memory leak caused by reloading the trusted table data. ```` kamctl trusted reload ```` We verified this by running script to reload the data frequently and captured memory usage using kex + corex. Thanks, Emmanuel
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/533
Can you attach the stats about memory usage? You had them on irc, it will help identifying the part of the code leaking. As discussed on irc, seems to be introduced by the new feature in 4.4 related to trusted table in permissions module.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/533#issuecomment-196318245
Hello, I found the memory leak in permissions. Can you please push this patch? ``` diff --git a/modules/permissions/hash.c b/modules/permissions/hash.c index cfc81fe..84b20e2 100644 --- a/modules/permissions/hash.c +++ b/modules/permissions/hash.c @@ -423,6 +423,7 @@ void empty_hash_table(struct trusted_list **table) while (np) { if (np->src_ip.s) shm_free(np->src_ip.s); if (np->pattern) shm_free(np->pattern); + if (np->ruri_pattern) shm_free(np->ruri_pattern); if (np->tag.s) shm_free(np->tag.s); next = np->next; shm_free(np); ```
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/533#issuecomment-196341332
Make a pull request, then it can be easily merged. Don't forget to format the commit message as suggested by github commit guidelines from kamaikio.org wiki.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/533#issuecomment-196357616
Please see PR https://github.com/kamailio/kamailio/pull/546
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/533#issuecomment-196375832
Closed #533.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/533#event-590095890