From e01c28c6d54ed34deb1536d706f6d113c29807df Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 20 Oct 2008 12:54:37 +0000 Subject: [PATCH] (FSBUILD-83) no need to allocate this twice git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10077 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_voicemail/mod_voicemail.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index c59655c73e..16bfde5601 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -1548,7 +1548,6 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t static void update_mwi(vm_profile_t *profile, const char *id, const char *domain_name, const char *myfolder) { - char *mwi_id; const char *yn = "no"; int total_new_messages = 0; int total_saved_messages = 0; @@ -1565,13 +1564,10 @@ static void update_mwi(vm_profile_t *profile, const char *id, const char *domain if (total_new_messages || total_new_urgent_messages) { yn = "yes"; } - mwi_id = switch_mprintf("%s@%s", id, domain_name); - switch_assert(mwi_id); switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Messages-Waiting", "%s", yn); - switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Message-Account", mwi_id); + switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Message-Account", "%s@%s", id, domain_name); switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Voice-Message", "%d/%d (%d/%d)", total_new_messages, total_saved_messages, total_new_urgent_messages, total_saved_urgent_messages); switch_event_fire(&event); - switch_safe_free(mwi_id); }