From: Mark Michelson Date: Mon, 23 Jan 2017 22:18:18 +0000 (-0600) Subject: Free endpoint ACLs when destroying PJSIP endpoints. X-Git-Tag: 14.3.0-rc1~34^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27c7d6d6443f5a9d7c17a3bfafa77a31fa89aa47;p=thirdparty%2Fasterisk.git 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 --- diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c index b48b8b447b..2793285826 100644 --- a/res/res_pjsip/pjsip_configuration.c +++ b/res/res_pjsip/pjsip_configuration.c @@ -2068,6 +2068,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)