dect
/
asterisk
Archived
13
0
Fork 0

small fix for 7944

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42891 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
anthonyl 2006-09-13 19:27:27 +00:00
parent 6f46f16a24
commit 21aead3d65
1 changed files with 11 additions and 0 deletions

View File

@ -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);