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
This commit is contained in:
parent
9b6063ae77
commit
103dfc02cb
|
@ -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++) {
|
||||
|
|
Loading…
Reference in New Issue