From: Kurt Zeilenga Date: Fri, 20 Aug 1999 20:09:48 +0000 (+0000) Subject: Fix leak of edn when binding as rootdn. X-Git-Tag: OPENLDAP_REL_ENG_1_2_7~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6d074e0911a1d2ddcdc2d75419d9aef53f2f8cec;p=openldap Fix leak of edn when binding as rootdn. --- diff --git a/servers/slapd/back-ldbm/bind.c b/servers/slapd/back-ldbm/bind.c index ac461e7668..cb1fd03217 100644 --- a/servers/slapd/back-ldbm/bind.c +++ b/servers/slapd/back-ldbm/bind.c @@ -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;