[asterisk-commits] Free endpoint ACLs when destroying PJSIP endpoints. (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 24 15:49:08 CST 2017


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/4772 )

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; 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 8959068..bfaf750 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -2070,6 +2070,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/4772
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1f8bf5b7a0de628c975beba01e69c56893331ad
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
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-commits mailing list