]> git.sur5r.net Git - openldap/commitdiff
Fix leak of edn when binding as rootdn.
authorKurt Zeilenga <kurt@openldap.org>
Fri, 20 Aug 1999 20:09:48 +0000 (20:09 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 20 Aug 1999 20:09:48 +0000 (20:09 +0000)
servers/slapd/back-ldbm/bind.c

index ac461e7668f04296c1d3a498d063864ba0eae960..cb1fd032179f6e6e8db8dfa3e895ed66fe988b76 100644 (file)
@@ -128,6 +128,7 @@ ldbm_back_bind(
                if ( (a = attr_find( e->e_attrs, "userpassword" )) == NULL ) {
                        if ( be_isroot_pw( be, dn, cred ) ) {
                                /* front end will send result */
+                               if( *edn != NULL ) free( *edn );
                                *edn = ch_strdup( be_root_dn( be ) );
                                rc = 0;
                                goto return_results;
@@ -142,6 +143,7 @@ ldbm_back_bind(
                {
                        if ( be_isroot_pw( be, dn, cred ) ) {
                                /* front end will send result */
+                               if( *edn != NULL ) free( *edn );
                                *edn = ch_strdup( be_root_dn( be ) );
                                rc = 0;
                                goto return_results;