From f25ac22c58e86609bc21a1c86a21693d79b65b9d Mon Sep 17 00:00:00 2001 From: Jani Taskinen Date: Mon, 21 Jul 2008 11:27:45 +0000 Subject: [PATCH] MFB: The rest of the fix too for previous commit --- ext/standard/basic_functions.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index e8842a9674..4bdf21404c 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -5083,8 +5083,12 @@ PHPAPI char *php_get_current_user(void) /* {{{ */ if ((pwd=getpwuid(pstat->st_uid))==NULL) { return ""; } +#endif SG(request_info).current_user_length = strlen(pwd->pw_name); SG(request_info).current_user = estrndup(pwd->pw_name, SG(request_info).current_user_length); +#if defined(ZTS) && defined(HAVE_GETPWUID_R) && defined(_SC_GETPW_R_SIZE_MAX) + efree(pwbuf); +#endif return SG(request_info).current_user; #endif } -- 2.40.0