[asterisk-commits] mmichelson: branch russell/ast_channel_ao2 r189083 - /team/russell/ast_channe...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 17 15:12:59 CDT 2009


Author: mmichelson
Date: Fri Apr 17 15:12:56 2009
New Revision: 189083

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=189083
Log:
ast_autochan_setup should return NULL if a NULL input is given.


Modified:
    team/russell/ast_channel_ao2/main/autochan.c

Modified: team/russell/ast_channel_ao2/main/autochan.c
URL: http://svn.digium.com/svn-view/asterisk/team/russell/ast_channel_ao2/main/autochan.c?view=diff&rev=189083&r1=189082&r2=189083
==============================================================================
--- team/russell/ast_channel_ao2/main/autochan.c (original)
+++ team/russell/ast_channel_ao2/main/autochan.c Fri Apr 17 15:12:56 2009
@@ -36,6 +36,10 @@
 struct ast_autochan *ast_autochan_setup(struct ast_channel *chan)
 {
 	struct ast_autochan *autochan;
+
+	if (!chan) {
+		return NULL;
+	}
 
 	if (!(autochan = ast_calloc(1, sizeof(*autochan)))) {
 		return NULL;




More information about the asterisk-commits mailing list