From: Howard Chu Date: Sat, 15 Dec 2001 12:07:40 +0000 (+0000) Subject: Don't copy and leak user; it's an env var so just use it directly. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~648 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2b0819c4a9209784f762ec154ce4721038522a8a;p=openldap Don't copy and leak user; it's an env var so just use it directly. --- diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c index 05b931a4df..e05ade2d4c 100644 --- a/libraries/libldap/init.c +++ b/libraries/libldap/init.c @@ -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