Module: kamailio
Branch: master
Commit: d7f4493da751802dc47a694d251d34a85a7b3bf1
URL:
https://github.com/kamailio/kamailio/commit/d7f4493da751802dc47a694d251d34a…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2019-12-03T12:12:54+01:00
permissions: fix crash if load_backends parameter is 1
fixes #2151
---
Modified: src/modules/permissions/permissions.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d7f4493da751802dc47a694d251d34a…
Patch:
https://github.com/kamailio/kamailio/commit/d7f4493da751802dc47a694d251d34a…
---
diff --git a/src/modules/permissions/permissions.c
b/src/modules/permissions/permissions.c
index 7505bb3dd1..30637380d4 100644
--- a/src/modules/permissions/permissions.c
+++ b/src/modules/permissions/permissions.c
@@ -648,8 +648,10 @@ static int mod_init(void)
static int child_init(int rank)
{
- if (init_child_trusted(rank) == -1)
- return -1;
+ if(_perm_load_backends&PERM_LOAD_TRUSTEDDB) {
+ if(init_child_trusted(rank) == -1)
+ return -1;
+ }
return 0;
}