]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Free endpoint ACLs when destroying PJSIP endpoints. 72/4772/1
authorMark Michelson <mmichelson@digium.com>
Mon, 23 Jan 2017 22:18:18 +0000 (16:18 -0600)
committerMark Michelson <mmichelson@digium.com>
Mon, 23 Jan 2017 22:20:42 +0000 (16:20 -0600)
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

res/res_pjsip/pjsip_configuration.c

index 89590689be640264a9b26b7a3b296ce1731c8051..bfaf750d4ae8bb997675d891838fd70128466d3b 100644 (file)
@@ -2070,6 +2070,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)