[asterisk-commits] seanbright: trunk r304867 - in /trunk: ./ res/res_config_ldap.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Jan 29 17:10:10 CST 2011
Author: seanbright
Date: Sat Jan 29 17:10:06 2011
New Revision: 304867
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=304867
Log:
Merged revisions 304866 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r304866 | seanbright | 2011-01-29 18:07:18 -0500 (Sat, 29 Jan 2011) | 14 lines
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:
trunk/ (props changed)
trunk/res/res_config_ldap.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/res/res_config_ldap.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_config_ldap.c?view=diff&rev=304867&r1=304866&r2=304867
==============================================================================
--- trunk/res/res_config_ldap.c (original)
+++ trunk/res/res_config_ldap.c Sat Jan 29 17:10:06 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