]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
CID: 1294548 adding a check for the return value
authorWilliam King <william.king@quentustech.com>
Thu, 16 Apr 2015 15:32:52 +0000 (08:32 -0700)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:21 +0000 (12:47 -0500)
src/mod/endpoints/mod_verto/mod_verto.c

index 928201931e1d5789a4f0404574ed5922fc7c47c3..4be239842db7f2e707837841494c66bb2cf102f6 100644 (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"));