[sr-dev] git:master:82f74a57: domain: proper memset of the hash tables used by domain at init time

Daniel-Constantin Mierla miconda at gmail.com
Tue Sep 22 23:06:56 CEST 2015


Module: kamailio
Branch: master
Commit: 82f74a57229e46e9b9302a6b4caebed6860c47ed
URL: https://github.com/kamailio/kamailio/commit/82f74a57229e46e9b9302a6b4caebed6860c47ed

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-09-22T23:05:27+02:00

domain: proper memset of the hash tables used by domain at init time

- discovered on a report by Juha Heinanen

---

Modified: modules/domain/domain_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/82f74a57229e46e9b9302a6b4caebed6860c47ed.diff
Patch: https://github.com/kamailio/kamailio/commit/82f74a57229e46e9b9302a6b4caebed6860c47ed.patch

---

diff --git a/modules/domain/domain_mod.c b/modules/domain/domain_mod.c
index 2f204d1..45697fd 100644
--- a/modules/domain/domain_mod.c
+++ b/modules/domain/domain_mod.c
@@ -210,9 +210,9 @@ static int mod_init(void)
 	goto error;
     }
     memset(hash_table_1, 0, sizeof(struct domain_list *) *
-	   DOM_HASH_SIZE + 1);
+	   (DOM_HASH_SIZE + 1));
     memset(hash_table_2, 0, sizeof(struct domain_list *) *
-	   DOM_HASH_SIZE + 1);
+	   (DOM_HASH_SIZE + 1));
     *hash_table = hash_table_1;
 
     /* Allocate and initialize locks */




More information about the sr-dev mailing list