From: Dragos Oancea Date: Tue, 25 Feb 2020 22:09:33 +0000 (+0000) Subject: [mod_amqp] scan-build: Dereference of null pointer (loaded from variable 'active... X-Git-Tag: v1.10.3^2~105^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F437%2Fhead;p=thirdparty%2Ffreeswitch.git [mod_amqp] scan-build: Dereference of null pointer (loaded from variable 'active') - mod_amqp_connection_open() --- diff --git a/src/mod/event_handlers/mod_amqp/mod_amqp_connection.c b/src/mod/event_handlers/mod_amqp/mod_amqp_connection.c index 7f56c9579c..2210ed032a 100644 --- a/src/mod/event_handlers/mod_amqp/mod_amqp_connection.c +++ b/src/mod/event_handlers/mod_amqp/mod_amqp_connection.c @@ -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);