Преглед изворни кода

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