From: Travis Cross Date: Thu, 29 May 2014 14:24:48 +0000 (+0000) Subject: Assert on implied failure to malloc X-Git-Tag: v1.4.5~2^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6663692ff7a1f3aeb8abaed80486b930203dc01f;p=thirdparty%2Ffreeswitch.git Assert on implied failure to malloc switch_event_expand_headers should only return null on a malloc failure, so we might as well just assert here. --- diff --git a/src/mod/applications/mod_fifo/mod_fifo.c b/src/mod/applications/mod_fifo/mod_fifo.c index ce980ae2c0..95402638cc 100644 --- a/src/mod/applications/mod_fifo/mod_fifo.c +++ b/src/mod/applications/mod_fifo/mod_fifo.c @@ -1476,6 +1476,7 @@ static void *SWITCH_THREAD_FUNC outbound_ringall_thread_run(switch_thread_t *thr int use_ent = 0; char *expanded_originate_string = switch_event_expand_headers(ovars, h->originate_string); + switch_assert(expanded_originate_string); if (strstr(expanded_originate_string, "user/")) { switch_event_create_brackets(expanded_originate_string, '<', '>', ',', &ovars, &parsed, SWITCH_TRUE); use_ent = 1;