diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-01-14 23:18:40 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-01-14 23:18:40 +0000 |
commit | b7f97104650eebc61a6c3621850a1e4af5e4217d (patch) | |
tree | 99901bf5cead8129cc3f177d6c2a5a588f72bd9d /res | |
parent | 82ea2af7c9f1e04eb774941a9b48a9c1daa63535 (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.2@240280 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_config_ldap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c index 91ea260ce..d02353383 100644 --- a/res/res_config_ldap.c +++ b/res/res_config_ldap.c @@ -365,8 +365,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) |