]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_amqp] scan-build: Dereference of null pointer (loaded from variable 'active... 437/head
authorDragos Oancea <dragos@signalwire.com>
Tue, 25 Feb 2020 22:09:33 +0000 (22:09 +0000)
committerDragos Oancea <dragos@signalwire.com>
Tue, 25 Feb 2020 22:09:33 +0000 (22:09 +0000)
src/mod/event_handlers/mod_amqp/mod_amqp_connection.c

index 7f56c9579c1424bd49e9e3e6b03676014beaf8d3..2210ed032a84b9eb8df2ebddef92c6ae52cd2472 100644 (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);