CID: 1294548 adding a check for the return value

This commit is contained in:
William King 2015-04-16 08:32:52 -07:00 committed by Michael Jerris
parent 99f61f7ab8
commit 5e35f27cb1
1 changed files with 3 additions and 1 deletions

View File

@ -3238,7 +3238,9 @@ static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock
*response = obj;
switch_event_create_plain(&var_event, SWITCH_EVENT_CHANNEL_DATA);
if (switch_event_create_plain(&var_event, SWITCH_EVENT_CHANNEL_DATA) != SWITCH_STATUS_SUCCESS) {
err=1; goto cleanup;
}
if (!(dialog = cJSON_GetObjectItem(params, "dialogParams"))) {
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("Dialog data missing"));