浏览代码

HPCC-12249 Fix memory leaks in LDAPSecurity lib

ValGrind testing found some memory leaks in the LDAP Security manager. This
pull requests fixes as many as I could initially identify from testing. Specifically,
ldap_memfree needed to be called after every iteration of ldap_first/next_attribute,
and ldap_values_free needed to be called after every call to ldap_get_values.

Signed-off-by: William Whitehead <william.whitehead@lexisnexis.com>
William Whitehead 10 年之前
父节点
当前提交
745d018cac
共有 2 个文件被更改,包括 376 次插入422 次删除
  1. 1 1
      esp/services/ws_access/ws_accessService.cpp
  2. 375 421
      system/security/LdapSecurity/ldapconnection.cpp

+ 1 - 1
esp/services/ws_access/ws_accessService.cpp

@@ -3448,7 +3448,7 @@ bool Cws_accessEx::onFilePermission(IEspContext &context, IEspFilePermissionRequ
             resp.setFileName(fileName);
             resp.setUserName(userName);
 
-            ISecUser* sec_user = secmgr->findUser(userName);
+            Owned<ISecUser> sec_user = secmgr->findUser(userName);
             if (sec_user)
             {
                 StringBuffer accessStr;

文件差异内容过多而无法显示
+ 375 - 421
system/security/LdapSecurity/ldapconnection.cpp