]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
handle allocation error. Found by Klockwork (www.klocwork.com)
authorMichael Jerris <mike@jerris.com>
Wed, 21 May 2008 20:25:40 +0000 (20:25 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 21 May 2008 20:25:40 +0000 (20:25 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8508 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_play_say.c

index c157538ce7ed07ca741208b8426ebe7350542907..000ae7e1c9d0d14323c31c548440e244583782ca 100644 (file)
@@ -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++) {