]> git.sur5r.net Git - openldap/commitdiff
ITS#6568
authorQuanah Gibson-Mount <quanah@openldap.org>
Thu, 10 Jun 2010 19:39:48 +0000 (19:39 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 10 Jun 2010 19:39:48 +0000 (19:39 +0000)
CHANGES
libraries/libldap/request.c
libraries/libldap/unbind.c

diff --git a/CHANGES b/CHANGES
index deaeb919daa9c7edc8cacd44d304d9d405b72026..b2b433e64354e347413b2c8589dd59445aac3941 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
 OpenLDAP 2.4 Change Log
 
 OpenLDAP 2.4.23 Engineering
+       Fixed libldap memleaks (ITS#6568)
        Fixed liblutil off-by-one with delta (ITS#6541)
        Fixed slapd syncrepl rid logging (ITS#6533)
        Fixed slapd-bdb hasSubordinates computation (ITS#6549)
index 2c1e787bdf3721b822e7e8cfd122802b34705611..205599300a3fe8747f0a2b4029f29f4374e23a9e 100644 (file)
@@ -124,10 +124,14 @@ ldap_send_initial_request(
                        if (ld->ld_options.ldo_cldapdn)
                                ldap_memfree(ld->ld_options.ldo_cldapdn);
                        ld->ld_options.ldo_cldapdn = ldap_strdup(dn);
+                       ber_free( ber, 1 );
                        return 0;
                }
                if (msgtype != LDAP_REQ_ABANDON && msgtype != LDAP_REQ_SEARCH)
+               {
+                       ber_free( ber, 1 );
                        return LDAP_PARAM_ERROR;
+               }
        }
 #endif
 #ifdef LDAP_R_COMPILE
index 15e6ee4f1b23c62756e542f4f42ba4af7ac7b26d..bd4df7a8497fb6674592b28e82f7aef1784396c2 100644 (file)
@@ -154,6 +154,11 @@ ldap_ld_free(
                LDAP_FREE( ld->ld_options.ldo_peer );
                ld->ld_options.ldo_peer = NULL;
        }
+
+       if ( ld->ld_options.ldo_cldapdn != NULL ) {
+               LDAP_FREE( ld->ld_options.ldo_cldapdn );
+               ld->ld_options.ldo_cldapdn = NULL;
+       }
 #endif
 
 #ifdef HAVE_CYRUS_SASL