Module: kamailio
Branch: master
Commit: baa542151de2af11752116b69db5d343a2c65159
URL:
https://github.com/kamailio/kamailio/commit/baa542151de2af11752116b69db5d34…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2018-12-20T11:40:17+01:00
secfilter: fix segmentation fault on mod_destroy
---
Modified: src/modules/secfilter/secfilter.c
---
Diff:
https://github.com/kamailio/kamailio/commit/baa542151de2af11752116b69db5d34…
Patch:
https://github.com/kamailio/kamailio/commit/baa542151de2af11752116b69db5d34…
---
diff --git a/src/modules/secfilter/secfilter.c b/src/modules/secfilter/secfilter.c
index 2b5b91d84e..1a32b1274d 100644
--- a/src/modules/secfilter/secfilter.c
+++ b/src/modules/secfilter/secfilter.c
@@ -34,7 +34,7 @@
MODULE_VERSION
-secf_data_p secf_data;
+secf_data_p secf_data = NULL;
/* Static and shared functions */
static int mod_init(void);
@@ -658,6 +658,8 @@ static int child_init(int rank)
static void mod_destroy(void)
{
LM_DBG("SECFILTER module destroy\n");
+ if(!secf_data)
+ return;
/* Free shared data */
free_data();
/* Destroy lock */