cvs: php-src /ext/standard basic_functions.c
| From: | Jani Taskinen | Date: | Mon, 21 Jul 2008 11:27:45 +0000 |
| Subject: | cvs: php-src /ext/standard basic_functions.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-51315@lists.php.net to get a copy of this message | ||
jani Mon Jul 21 11:27:45 2008 UTC
Modified files:
/php-src/ext/standard basic_functions.c
Log:
MFB: The rest of the fix too for previous commit
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.904&r2=1.905&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.904 php-src/ext/standard/basic_functions.c:1.905
--- php-src/ext/standard/basic_functions.c:1.904 Mon Jul 21 10:16:32 2008
+++ php-src/ext/standard/basic_functions.c Mon Jul 21 11:27:45 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.904 2008/07/21 10:16:32 jani Exp $ */
+/* $Id: basic_functions.c,v 1.905 2008/07/21 11:27:45 jani Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -5083,8 +5083,12 @@
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
}