Module: kamailio
Branch: master
Commit: c28551cd245f5e8ab9fc5d5c29f657cc06ad81e2
URL:
https://github.com/kamailio/kamailio/commit/c28551cd245f5e8ab9fc5d5c29f657c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-01-28T22:02:56+01:00
userblacklist: init variables for safer destroy at startup
- reported by GH#42
---
Modified: modules/userblacklist/userblacklist.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c28551cd245f5e8ab9fc5d5c29f657c…
Patch:
https://github.com/kamailio/kamailio/commit/c28551cd245f5e8ab9fc5d5c29f657c…
---
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;
}