From: Michael Jerris Date: Wed, 21 May 2008 20:25:40 +0000 (+0000) Subject: handle allocation error. Found by Klockwork (www.klocwork.com) X-Git-Tag: v1.0.0~169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=103dfc02cb10afb7ca368b1c20e2bcef744357ff;p=thirdparty%2Ffreeswitch.git handle allocation error. Found by Klockwork (www.klocwork.com) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8508 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index c157538ce7..000ae7e1c9 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -1386,6 +1386,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session char *tp; switch_size_t mylen = strlen(text) + extra + 1; tmp = malloc(mylen); + if (!tmp) { + return SWITCH_STATUS_MEMERR; + } memset(tmp, 0, mylen); tp = tmp; for (p = text; p && *p; p++) {