Module: kamailio Branch: master Commit: 207d7adae4ca5d9a197c38ae333ff98124c01b47 URL: https://github.com/kamailio/kamailio/commit/207d7adae4ca5d9a197c38ae333ff981...
Author: MancaÈ George mancasg@users.noreply.github.com Committer: GitHub noreply@github.com Date: 2021-04-16T19:26:35+03:00
domain: fix use after free on domain reload
---
Modified: src/modules/domain/hash.c
---
Diff: https://github.com/kamailio/kamailio/commit/207d7adae4ca5d9a197c38ae333ff981... Patch: https://github.com/kamailio/kamailio/commit/207d7adae4ca5d9a197c38ae333ff981...
---
diff --git a/src/modules/domain/hash.c b/src/modules/domain/hash.c index 4cb968e458..b085d8f9cb 100644 --- a/src/modules/domain/hash.c +++ b/src/modules/domain/hash.c @@ -204,8 +204,9 @@ void hash_table_free(struct domain_list **hash_table) shm_free(ap); ap = next_ap; } + next = np->next; shm_free(np); - np = np->next; + np = next; }
hash_table[DOM_HASH_SIZE] = NULL;