[sr-dev] git:4.2:7ae59337: domain: proper memset of the hash tables used by domain at init time

Juha Heinanen jh at tutpro.com
Wed Sep 23 06:28:51 CEST 2015


Module: kamailio
Branch: 4.2
Commit: 7ae5933773c9e451c62222c8190539d02db5b448
URL: https://github.com/kamailio/kamailio/commit/7ae5933773c9e451c62222c8190539d02db5b448

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Juha Heinanen <jh at tutpro.com>
Date: 2015-09-23T07:26:59+03:00

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

- discovered on a report by Juha Heinanen

(cherry picked from commit 82f74a57229e46e9b9302a6b4caebed6860c47ed)
(cherry picked from commit 33939d102b836e440915ce958e90cef36aafec2d)

---

Modified: modules/domain/domain_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/7ae5933773c9e451c62222c8190539d02db5b448.diff
Patch: https://github.com/kamailio/kamailio/commit/7ae5933773c9e451c62222c8190539d02db5b448.patch

---

diff --git a/modules/domain/domain_mod.c b/modules/domain/domain_mod.c
index 6a31227..25fdfd1 100644
--- a/modules/domain/domain_mod.c
+++ b/modules/domain/domain_mod.c
@@ -221,9 +221,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