[mod_sofia] scan-build: Fix dereference of null pointer in sofia_outgoing_channel().

This commit is contained in:
Andrey Volk committed 2021-10-19 20:26:53 +03:00
1 parent 51ef2f261a
commit 86a075da56
1 file changed
+1 -1
+1 -1
View File
@@ -4797,7 +4797,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
*dest++ = '\0';
if (!(gateway_ptr = sofia_reg_find_gateway(gw))) {
if (!(gateway_ptr = sofia_reg_find_gateway(gw)) || !gateway_ptr->profile) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid Gateway \'%s\'\n", gw);
cause = SWITCH_CAUSE_INVALID_GATEWAY;
goto error;