[Asterisk-code-review] Free endpoint ACLs when destroying PJSIP endpoints. (asterisk[master])

Mark Michelson asteriskteam at digium.com
Mon Jan 23 16:22:35 CST 2017


Mark Michelson has uploaded a new change for review. ( https://gerrit.asterisk.org/4773 )

Change subject: Free endpoint ACLs when destroying PJSIP endpoints.
......................................................................

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
---
M res/res_pjsip/pjsip_configuration.c
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/73/4773/1

diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 6a15946..1111664 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -2069,6 +2069,8 @@
 	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)

-- 
To view, visit https://gerrit.asterisk.org/4773
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1f8bf5b7a0de628c975beba01e69c56893331ad
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-code-review mailing list