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

Joshua Colp asteriskteam at digium.com
Tue Jan 24 12:44:26 CST 2017


Joshua Colp has submitted this change and it was merged. ( 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(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



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: merged
Gerrit-Change-Id: Ie1f8bf5b7a0de628c975beba01e69c56893331ad
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list