[asterisk-commits] dlee: branch dlee/ASTERISK-21969 r397425 - /team/dlee/ASTERISK-21969/res/stasis/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 22 11:29:14 CDT 2013


Author: dlee
Date: Thu Aug 22 11:29:12 2013
New Revision: 397425

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=397425
Log:
Check for alloc failure

Modified:
    team/dlee/ASTERISK-21969/res/stasis/app.c

Modified: team/dlee/ASTERISK-21969/res/stasis/app.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/res/stasis/app.c?view=diff&rev=397425&r1=397424&r2=397425
==============================================================================
--- team/dlee/ASTERISK-21969/res/stasis/app.c (original)
+++ team/dlee/ASTERISK-21969/res/stasis/app.c Thu Aug 22 11:29:12 2013
@@ -498,6 +498,9 @@
 	app->forwards = ao2_container_alloc_rbtree(AO2_ALLOC_OPT_LOCK_MUTEX,
 		AO2_CONTAINER_ALLOC_OPT_DUPS_OBJ_REJECT,
 		forwards_sort, NULL);
+	if (!app->forwards) {
+		return NULL;
+	}
 
 	app->topic = stasis_topic_create(name);
 	if (!app->topic) {




More information about the asterisk-commits mailing list