summaryrefslogtreecommitdiff
path: root/res/res_pjsip/pjsip_configuration.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2017-01-23 16:18:18 -0600
committerMark Michelson <mmichelson@digium.com>2017-01-23 16:22:34 -0600
commit4bfeda6ee4bfc217d1273aad0bc64791591bbabf (patch)
tree2407c03edccf4e6b93275cf2900f8490edc6f8eb /res/res_pjsip/pjsip_configuration.c
parent2481a55fba93b77e72d54b1ddfd07213750206ba (diff)
Free endpoint ACLs when destroying PJSIP endpoints.
If endpoint ACLs were specified, they were not being freed when endpoints were destroyed. On systems with realtime endpoints, this could add up quickly since each DB lookup would allocate the ACL without freeing it. ASTERISK-26731 #close Reported by Ustinov Artem Change-Id: Ie1f8bf5b7a0de628c975beba01e69c56893331ad
Diffstat (limited to 'res/res_pjsip/pjsip_configuration.c')
-rw-r--r--res/res_pjsip/pjsip_configuration.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 6a15946d6..1111664dc 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -2069,6 +2069,8 @@ static void endpoint_destructor(void* obj)
ast_variables_destroy(endpoint->channel_vars);
AST_VECTOR_FREE(&endpoint->ident_method_order);
ast_free(endpoint->contact_user);
+ ast_free_acl_list(endpoint->contact_acl);
+ ast_free_acl_list(endpoint->acl);
}
static int init_subscription_configuration(struct ast_sip_endpoint_subscription_configuration *subscription)