aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-14 23:18:34 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-14 23:18:34 +0000
commit1dc273a23628b337795123d3ac3422a5899f880e (patch)
treeb9cac014487f8877f992de71b2bc2d96d2a14e7e /res
parent34aa1211b4ff2ef52a34de18105cfa4d76b4102c (diff)
Merged revisions 240271 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r240271 | seanbright | 2010-01-14 18:13:02 -0500 (Thu, 14 Jan 2010) | 7 lines Plug a memory leak in res_config_ldap. (closes issue #16257) Reported by: nito Patches: issue16257_20100111.diff uploaded by seanbright (license 71) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@240279 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_config_ldap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c
index e973b1caa..84602a3b2 100644
--- a/res/res_config_ldap.c
+++ b/res/res_config_ldap.c
@@ -364,8 +364,10 @@ static struct ast_variable **realtime_ldap_result_to_vars(struct ldap_table_conf
ldap_entry = ldap_first_entry(ldapConn, ldap_result_msg);
for (tot_count = 0; ldap_entry; tot_count++){
- tot_count += semicolon_count_var(realtime_ldap_entry_to_var(table_config, ldap_entry));
+ struct ast_variable *tmp = realtime_ldap_entry_to_var(table_config, ldap_entry);
+ tot_count += semicolon_count_var(tmp);
ldap_entry = ldap_next_entry(ldapConn, ldap_entry);
+ ast_variables_destroy(tmp);
}
if (entries_count_ptr)