[Freeswitch-svn] [commit] r10869 - freeswitch/trunk/src/mod/event_handlers/mod_radius_cdr

FreeSWITCH SVN cparker at freeswitch.org
Thu Dec 18 07:51:48 PST 2008


Author: cparker
Date: Thu Dec 18 10:51:48 2008
New Revision: 10869

Log:
Fix potential seg_fault reported in MODEVENT-35

Modified:
   freeswitch/trunk/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c

Modified: freeswitch/trunk/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c	Thu Dec 18 10:51:48 2008
@@ -554,7 +554,8 @@
 					goto end;
 				}
 			}
-			if (profile->caller_extension && profile->caller_extension->last_application->application_name) {
+			if (profile->caller_extension && profile->caller_extension->last_application && 
+			    profile->caller_extension->last_application->application_name) {
 				if (rc_avpair_add(rad_config, &send, PW_FS_LASTAPP,
 								  (void *) profile->caller_extension->last_application->application_name, -1, PW_FS_PEC) == NULL) {
 					switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "failed adding Freeswitch-Lastapp: %s\n", profile->source);



More information about the Freeswitch-svn mailing list