Module: kamailio
Branch: 4.2
Commit: 0421282a10446dd67236b6d4c7d103ee45301c28
URL:
https://github.com/kamailio/kamailio/commit/0421282a10446dd67236b6d4c7d103e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-01-28T13:39:47+01:00
permissions: init global pointer variables to null for safe shutdown at start
- reported by Olle E. Johansson, GH#41
(cherry picked from commit 165a3fc2e4dfed09bd9f46e43270d49cf5f72a87)
---
Modified: modules/permissions/address.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0421282a10446dd67236b6d4c7d103e…
Patch:
https://github.com/kamailio/kamailio/commit/0421282a10446dd67236b6d4c7d103e…
---
diff --git a/modules/permissions/address.c b/modules/permissions/address.c
index 45eecf6..7ad0fb5 100644
--- a/modules/permissions/address.c
+++ b/modules/permissions/address.c
@@ -46,17 +46,17 @@
#define TABLE_VERSION 6
-struct addr_list ***addr_hash_table; /* Ptr to current hash table ptr */
-struct addr_list **addr_hash_table_1; /* Pointer to hash table 1 */
-struct addr_list **addr_hash_table_2; /* Pointer to hash table 2 */
+struct addr_list ***addr_hash_table = NULL; /* Ptr to current hash table ptr */
+struct addr_list **addr_hash_table_1 = NULL; /* Pointer to hash table 1 */
+struct addr_list **addr_hash_table_2 = NULL; /* Pointer to hash table 2 */
-struct subnet **subnet_table; /* Ptr to current subnet table */
-struct subnet *subnet_table_1; /* Ptr to subnet table 1 */
-struct subnet *subnet_table_2; /* Ptr to subnet table 2 */
+struct subnet **subnet_table = NULL; /* Ptr to current subnet table */
+struct subnet *subnet_table_1 = NULL; /* Ptr to subnet table 1 */
+struct subnet *subnet_table_2 = NULL; /* Ptr to subnet table 2 */
-struct domain_name_list ***domain_list_table; /* Ptr to current domain name table
*/
-static struct domain_name_list **domain_list_table_1; /* Ptr to domain name table 1
*/
-static struct domain_name_list **domain_list_table_2; /* Ptr to domain name table 2
*/
+struct domain_name_list ***domain_list_table = NULL; /* Ptr to current domain name table
*/
+static struct domain_name_list **domain_list_table_1 = NULL; /* Ptr to domain name table
1 */
+static struct domain_name_list **domain_list_table_2 = NULL; /* Ptr to domain name table
2 */
static db1_con_t* db_handle = 0;