Module: kamailio
Branch: 5.2
Commit: eae9d86fb1e579cb3a18577884f631014ad7b455
URL:
https://github.com/kamailio/kamailio/commit/eae9d86fb1e579cb3a18577884f6310…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-01-23T15:21:30+01: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/eae9d86fb1e579cb3a18577884f6310…
Patch:
https://github.com/kamailio/kamailio/commit/eae9d86fb1e579cb3a18577884f6310…
---
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;
}