Module: kamailio
Branch: 5.3
Commit: aa793407020874377ce7c4ea871aa591c2b4a39d
URL:
https://github.com/kamailio/kamailio/commit/aa793407020874377ce7c4ea871aa59…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-08-13T00:39:08+02:00
permissions: fix crash if load_backends parameter is 1
fixes #2151
(cherry picked from commit d7f4493da751802dc47a694d251d34a85a7b3bf1)
---
Modified: src/modules/permissions/permissions.c
---
Diff:
https://github.com/kamailio/kamailio/commit/aa793407020874377ce7c4ea871aa59…
Patch:
https://github.com/kamailio/kamailio/commit/aa793407020874377ce7c4ea871aa59…
---
diff --git a/src/modules/permissions/permissions.c
b/src/modules/permissions/permissions.c
index b69cf63922..f31cadfa23 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;
}