Merge pull request #282 from dragos-oancea/switch_ivr_collect_digits_callback-null-deref

[core] scan-build: Called function pointer is null (null dereference) - switch_ivr_collect_digits_callback()
This commit is contained in:
Andrey Volk 2020-02-01 02:25:03 +04:00 committed by GitHub
commit 24aa732728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1299,7 +1299,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_s
}
if (switch_core_session_dequeue_event(session, &event, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) {
switch_status_t ostatus = args->input_callback(session, event, SWITCH_INPUT_TYPE_EVENT, args->buf, args->buflen);
switch_status_t ostatus = SWITCH_STATUS_FALSE;
if (args->input_callback) {
ostatus = args->input_callback(session, event, SWITCH_INPUT_TYPE_EVENT, args->buf, args->buflen);
}
if (ostatus != SWITCH_STATUS_SUCCESS) {
status = ostatus;
}