aboutsummaryrefslogtreecommitdiffstats
path: root/main/loader.c
diff options
context:
space:
mode:
authoranthonyl <anthonyl@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-13 19:27:27 +0000
committeranthonyl <anthonyl@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-13 19:27:27 +0000
commit21aead3d65fdabfebfabfc966ba67b497524cee8 (patch)
tree771e75068ec9449907a0d9920efd533f9e65e27c /main/loader.c
parent6f46f16a24e506364c33cadf996158d847c266b7 (diff)
small fix for 7944
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42891 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/loader.c')
-rw-r--r--main/loader.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/main/loader.c b/main/loader.c
index 30f5aa660..3b0005a6a 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -199,6 +199,17 @@ struct ast_module_user *__ast_module_user_add(struct ast_module *mod,
void __ast_module_user_remove(struct ast_module *mod, struct ast_module_user *u)
{
+
+ if (u <= 0) {
+ ast_log(LOG_ERROR,"ast_module_user invalid can not remove \n");
+ return;
+ }
+
+ if (mod <= 0) {
+ ast_log(LOG_ERROR,"ast_module invalid can not remove \n");
+ return;
+ }
+
AST_LIST_LOCK(&mod->users);
AST_LIST_REMOVE(&mod->users, u, entry);
AST_LIST_UNLOCK(&mod->users);