From 2b0819c4a9209784f762ec154ce4721038522a8a Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 15 Dec 2001 12:07:40 +0000 Subject: [PATCH] Don't copy and leak user; it's an env var so just use it directly. --- libraries/libldap/init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 -- 2.39.5