]> git.sur5r.net Git - openldap/commitdiff
ITS#6326
authorQuanah Gibson-Mount <quanah@openldap.org>
Fri, 30 Oct 2009 19:10:18 +0000 (19:10 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Fri, 30 Oct 2009 19:10:18 +0000 (19:10 +0000)
CHANGES
servers/slapd/back-ldap/search.c

diff --git a/CHANGES b/CHANGES
index 52de6498f9855aedd50f0803ddd9d352fc853cfc..061abbe3c10b40d4688358603dcf7c88277c0f29 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,7 @@ OpenLDAP 2.4 Change Log
 OpenLDAP 2.4.20 Engineering
        Fixed libldap uninitialized return value (ITS#6355)
        Fixed slapd debug handling of LDAP_DEBUG_ANY (ITS#6324)
+       Fixed slapd-ldap leak (ITS#6326)
        Documentation
                ldap_get_dn(3) typos (ITS#5366)
 
index c7458285016c94470e2e168ae306e56778d6f452..c8ccbed0ec2585e074eedde63dd5d80007983a3b 100644 (file)
@@ -759,6 +759,7 @@ ldap_build_entry(
                                                ( oc = oc_bvfind_undef( &attr->a_vals[i] ) ) != NULL )
                                {
                                        ber_dupbv( &pval, &oc->soc_cname );
+                                       rc = LDAP_SUCCESS;
 
                                } else {
                                        LBER_FREE( attr->a_vals[i].bv_val );
@@ -770,8 +771,9 @@ ldap_build_entry(
                                        BER_BVZERO( &attr->a_vals[last] );
                                        i--;
                                }
+                       }
 
-                       } else if ( pretty ) {
+                       if ( rc == LDAP_SUCCESS && pretty ) {
                                LBER_FREE( attr->a_vals[i].bv_val );
                                attr->a_vals[i] = pval;
                        }