From e573c86d906034dd8bdf2b941124ac66e328cfd2 Mon Sep 17 00:00:00 2001 From: Chris Parker Date: Thu, 18 Dec 2008 15:51:48 +0000 Subject: [PATCH] Fix potential seg_fault reported in MODEVENT-35 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10869 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c b/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c index fa90f9f2cb..ebd629aec7 100644 --- a/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c +++ b/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c @@ -554,7 +554,8 @@ static switch_status_t my_on_hangup(switch_core_session_t *session) 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);