[svn-commits] trunk r34495 - /trunk/res/res_smdi.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Jun 16 09:30:42 MST 2006


Author: file
Date: Fri Jun 16 11:30:42 2006
New Revision: 34495

URL: http://svn.digium.com/view/asterisk?rev=34495&view=rev
Log:
Handle failure of ast_calloc when allocating interfaces in res_smdi (issue #7344 reported by casper)

Modified:
    trunk/res/res_smdi.c

Modified: trunk/res/res_smdi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_smdi.c?rev=34495&r1=34494&r2=34495&view=diff
==============================================================================
--- trunk/res/res_smdi.c (original)
+++ trunk/res/res_smdi.c Fri Jun 16 11:30:42 2006
@@ -617,7 +617,8 @@
 				}
 			}
 							
-			iface = ast_calloc(1, sizeof(*iface));
+			if (!(iface = ast_calloc(1, sizeof(*iface))))
+				continue;
 
 			ASTOBJ_INIT(iface);
 			ASTOBJ_CONTAINER_INIT(&iface->md_q);



More information about the svn-commits mailing list