[asterisk-commits] anthonyl: trunk r42891 - /trunk/main/loader.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Sep 13 12:27:28 MST 2006


Author: anthonyl
Date: Wed Sep 13 14:27:27 2006
New Revision: 42891

URL: http://svn.digium.com/view/asterisk?rev=42891&view=rev
Log:
small fix for 7944

Modified:
    trunk/main/loader.c

Modified: trunk/main/loader.c
URL: http://svn.digium.com/view/asterisk/trunk/main/loader.c?rev=42891&r1=42890&r2=42891&view=diff
==============================================================================
--- trunk/main/loader.c (original)
+++ trunk/main/loader.c Wed Sep 13 14:27:27 2006
@@ -199,6 +199,17 @@
 
 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);



More information about the asterisk-commits mailing list