Module: kamailio
Branch: master
Commit: 4d58141ab84cf248e8c44a96181642ad0f187e80
URL:
https://github.com/kamailio/kamailio/commit/4d58141ab84cf248e8c44a96181642a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-08-22T17:09:37+02:00
rabbitmq: proper check for allocated pointer
---
Modified: src/modules/rabbitmq/rabbitmq.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4d58141ab84cf248e8c44a96181642a…
Patch:
https://github.com/kamailio/kamailio/commit/4d58141ab84cf248e8c44a96181642a…
---
diff --git a/src/modules/rabbitmq/rabbitmq.c b/src/modules/rabbitmq/rabbitmq.c
index 50d143723e6..aa986ca9952 100644
--- a/src/modules/rabbitmq/rabbitmq.c
+++ b/src/modules/rabbitmq/rabbitmq.c
@@ -571,7 +571,7 @@ static int rabbitmq_connect(amqp_connection_state_t *conn)
// establish a new connection to RabbitMQ server
*conn = amqp_new_connection();
- if(!conn) {
+ if(!*conn) {
LM_ERR("FAIL: create AMQP connection\n");
return RABBITMQ_ERR_CREATE;
}