[mod_amqp] scan-build: Dereference of null pointer (loaded from variable 'active') - mod_amqp_connection_open()

This commit is contained in:
Dragos Oancea 2020-02-25 22:09:33 +00:00
parent 42d3100609
commit 89555c2151
1 changed files with 3 additions and 1 deletions

View File

@ -126,7 +126,9 @@ switch_status_t mod_amqp_connection_open(mod_amqp_connection_t *connections, mod
}
}
*active = connection_attempt;
if (active) {
*active = connection_attempt;
}
if (!connection_attempt) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Profile[%s] could not connect to any AMQP brokers\n", profile_name);