]> git.sur5r.net Git - openldap/commitdiff
Don't copy and leak user; it's an env var so just use it directly.
authorHoward Chu <hyc@openldap.org>
Sat, 15 Dec 2001 12:07:40 +0000 (12:07 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 15 Dec 2001 12:07:40 +0000 (12:07 +0000)
libraries/libldap/init.c

index 05b931a4df6769ef6e05a06c0c555b8b45fff901..e05ade2d4cbb86f1c62219b9e90b1abf4e51d06e 100644 (file)
@@ -459,8 +459,7 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
                if( user == NULL ) user = getenv("LOGNAME");
 
                if( user != NULL ) {
-                       /* this value is leaked, need at_exit() handler */
-                       gopts->ldo_def_sasl_authcid = LDAP_STRDUP( user );
+                       gopts->ldo_def_sasl_authcid = user;
                }
     }
 #endif