Module: kamailio
Branch: master
Commit: 789deca1842bf278c7539fa05962ab9554c2697e
URL:
https://github.com/kamailio/kamailio/commit/789deca1842bf278c7539fa05962ab9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-04-03T21:48:12+02:00
evapi: safety check on log message during queue get
---
Modified: src/modules/evapi/evapi_dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/789deca1842bf278c7539fa05962ab9…
Patch:
https://github.com/kamailio/kamailio/commit/789deca1842bf278c7539fa05962ab9…
---
diff --git a/src/modules/evapi/evapi_dispatch.c b/src/modules/evapi/evapi_dispatch.c
index c965d0a7ef..f2aef08abf 100644
--- a/src/modules/evapi/evapi_dispatch.c
+++ b/src/modules/evapi/evapi_dispatch.c
@@ -177,7 +177,9 @@ evapi_env_t* evapi_queue_get(void)
}
lock_release(&_evapi_queue_packets->qlock);
- LM_DBG("getting message from queue [%.*s]\n", renv->msg.len,
renv->msg.s);
+ if(renv!=NULL) {
+ LM_DBG("getting message from queue [%.*s]\n", renv->msg.len,
renv->msg.s);
+ }
return renv;
}