[asterisk-commits] tilghman: trunk r247125 - /trunk/main/loader.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 17 01:01:17 CST 2010


Author: tilghman
Date: Wed Feb 17 01:01:13 2010
New Revision: 247125

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=247125
Log:
RTP documentation states that you can pass NULL as the module, so make sure that's really the case.

Modified:
    trunk/main/loader.c

Modified: trunk/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/loader.c?view=diff&rev=247125&r1=247124&r2=247125
==============================================================================
--- trunk/main/loader.c (original)
+++ trunk/main/loader.c Wed Feb 17 01:01:13 2010
@@ -1200,6 +1200,10 @@
 
 struct ast_module *ast_module_ref(struct ast_module *mod)
 {
+	if (!mod) {
+		return NULL;
+	}
+
 	ast_atomic_fetchadd_int(&mod->usecount, +1);
 	ast_update_use_count();
 
@@ -1208,6 +1212,10 @@
 
 void ast_module_unref(struct ast_module *mod)
 {
+	if (!mod) {
+		return;
+	}
+
 	ast_atomic_fetchadd_int(&mod->usecount, -1);
 	ast_update_use_count();
 }




More information about the asterisk-commits mailing list