[sr-dev] git:master:62d981da: Merge pull request #2712 from mancasg/patch-1

GitHub noreply at github.com
Mon Apr 19 08:20:25 CEST 2021


Module: kamailio
Branch: master
Commit: 62d981daa5d8d61f3f4f72996a613b8ad8e88f26
URL: https://github.com/kamailio/kamailio/commit/62d981daa5d8d61f3f4f72996a613b8ad8e88f26

Author: Olle E. Johansson <oej at edvina.net>
Committer: GitHub <noreply at github.com>
Date: 2021-04-19T08:20:20+02:00

Merge pull request #2712 from mancasg/patch-1

domain: fix use after free on domain reload

---

Modified: src/modules/domain/hash.c

---

Diff:  https://github.com/kamailio/kamailio/commit/62d981daa5d8d61f3f4f72996a613b8ad8e88f26.diff
Patch: https://github.com/kamailio/kamailio/commit/62d981daa5d8d61f3f4f72996a613b8ad8e88f26.patch

---

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;




More information about the sr-dev mailing list