Module: kamailio
Branch: master
Commit: bc97b7adf77406dfc08b57b4a7df912a76d324e5
URL:
https://github.com/kamailio/kamailio/commit/bc97b7adf77406dfc08b57b4a7df912…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-10-13T09:40:44+02:00
nats: safety check on nats_workers inside mod destroy
---
Modified: src/modules/nats/nats_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/bc97b7adf77406dfc08b57b4a7df912…
Patch:
https://github.com/kamailio/kamailio/commit/bc97b7adf77406dfc08b57b4a7df912…
---
diff --git a/src/modules/nats/nats_mod.c b/src/modules/nats/nats_mod.c
index 852d0fbbab2..b89bab5bd12 100644
--- a/src/modules/nats/nats_mod.c
+++ b/src/modules/nats/nats_mod.c
@@ -600,6 +600,9 @@ int nats_destroy_workers()
*/
static void mod_destroy(void)
{
+ if(nats_workers==NULL) {
+ return;
+ }
if(nats_destroy_workers() < 0) {
LM_ERR("could not cleanup workers\n");
}