[asterisk-commits] seanbright: branch 1.8 r304866 - in /branches/1.8: ./ res/res_config_ldap.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Jan 29 17:07:22 CST 2011
Author: seanbright
Date: Sat Jan 29 17:07:18 2011
New Revision: 304866
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=304866
Log:
Merged revisions 304865 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
........
r304865 | seanbright | 2011-01-29 18:05:25 -0500 (Sat, 29 Jan 2011) | 7 lines
Plug some memory leaks in the LDAP realtime driver.
(closes issue #18435)
Reported by: zaltar
Patches:
res_config_ldap.patch uploaded by zaltar (license 1148)
........
Modified:
branches/1.8/ (props changed)
branches/1.8/res/res_config_ldap.c
Propchange: branches/1.8/
------------------------------------------------------------------------------
Binary property 'branch-1.6.2-merged' - no diff available.
Modified: branches/1.8/res/res_config_ldap.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_config_ldap.c?view=diff&rev=304866&r1=304865&r2=304866
==============================================================================
--- branches/1.8/res/res_config_ldap.c (original)
+++ branches/1.8/res/res_config_ldap.c Sat Jan 29 17:07:18 2011
@@ -343,6 +343,7 @@
}
ldap_value_free_len(values);
}
+ ldap_memfree(ldap_attribute_name);
ldap_attribute_name = ldap_next_attribute(ldapConn, ldap_entry, ber);
}
ber_free(ber, 0);
@@ -508,6 +509,7 @@
} /*!< for (v = values; *v; v++) */
ldap_value_free_len(values);
}/*!< if (values) */
+ ldap_memfree(ldap_attribute_name);
ldap_attribute_name = ldap_next_attribute(ldapConn, ldap_entry, ber);
} /*!< while (ldap_attribute_name) */
ber_free(ber, 0);
@@ -1324,7 +1326,7 @@
ast_log(LOG_ERROR, "Couldn't modify '%s'='%s', dn:%s because %s\n",
attribute, lookup, dn, ldap_err2string(error));
}
-
+ ldap_memfree(dn);
ldap_entry = ldap_next_entry(ldapConn, ldap_entry);
}
}
@@ -1506,7 +1508,7 @@
if ((error = ldap_modify_ext_s(ldapConn, dn, ldap_mods, NULL, NULL)) != LDAP_SUCCESS) {
ast_log(LOG_ERROR, "Couldn't modify dn:%s because %s", dn, ldap_err2string(error));
}
-
+ ldap_memfree(dn);
ldap_entry = ldap_next_entry(ldapConn, ldap_entry);
}
}
More information about the asterisk-commits
mailing list