Module: kamailio
Branch: 4.2
Commit: 23e8ab71c7c6a3baf8858e02391e67f2e8c30c97
URL:
https://github.com/kamailio/kamailio/commit/23e8ab71c7c6a3baf8858e02391e67f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-02-04T18:06:49+01:00
userblacklist: init variables for safer destroy at startup
- reported by GH#42
(cherry picked from commit c28551cd245f5e8ab9fc5d5c29f657cc06ad81e2)
---
Modified: modules/userblacklist/userblacklist.c
---
Diff:
https://github.com/kamailio/kamailio/commit/23e8ab71c7c6a3baf8858e02391e67f…
Patch:
https://github.com/kamailio/kamailio/commit/23e8ab71c7c6a3baf8858e02391e67f…
---
diff --git a/modules/userblacklist/userblacklist.c
b/modules/userblacklist/userblacklist.c
index 5e13a04..73bcd0c 100644
--- a/modules/userblacklist/userblacklist.c
+++ b/modules/userblacklist/userblacklist.c
@@ -169,7 +169,7 @@ struct source_list_t {
static gen_lock_t *lock = NULL;
static struct source_list_t *sources = NULL;
-static struct dtrie_node_t *dtrie_root;
+static struct dtrie_node_t *dtrie_root = NULL;
static int check_user_blacklist_fixup(void** param, int param_no)
@@ -627,7 +627,7 @@ static int init_source_list(void)
SHM_MEM_ERROR;
return -1;
}
- sources->head = NULL;
+ memset(sources, 0, sizeof(struct source_list_t));
return 0;
}