Merge pull request #437 from dragos-oancea/mod_amqp-nullptr-deref

[mod_amqp] scan-build: Dereference of null pointer (loaded from variable 'active') - mod_amqp_connection_open()
This commit is contained in:
Andrey Volk 2020-02-27 00:01:26 +04:00 committed by GitHub
commit baeb11c208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);