[asterisk-commits] mjordan: branch 12 r411668 - /branches/12/res/res_hep.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 3 06:43:36 CDT 2014


Author: mjordan
Date: Thu Apr  3 06:43:24 2014
New Revision: 411668

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=411668
Log:
res_hep: Fix crash when hep.conf not available

Parts of res_hep properly checked for a valid configuration object before
attempting to access the configuration. A check, however, was missed when
a packet is sent. This patch fixes the crash caused by not checking if the
configuration object is valid.

Modified:
    branches/12/res/res_hep.c

Modified: branches/12/res/res_hep.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_hep.c?view=diff&rev=411668&r1=411667&r2=411668
==============================================================================
--- branches/12/res/res_hep.c (original)
+++ branches/12/res/res_hep.c Thu Apr  3 06:43:24 2014
@@ -532,7 +532,7 @@
 	RAII_VAR(struct module_config *, config, ao2_global_obj_ref(global_config), ao2_cleanup);
 	int res;
 
-	if (!config->general->enabled) {
+	if (!config || !config->general->enabled) {
 		return 0;
 	}
 




More information about the asterisk-commits mailing list