summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2003-12-18 11:32:19 +0000
committerWez Furlong <wez@php.net>2003-12-18 11:32:19 +0000
commit33ed73cb515a642b70611b5322ae65c6b79f6f07 (patch)
tree25006ce01494ce01d47baf903ad3504d4158f0ac
parent12b0501f55373c54abee8ad1b5ba225ad6e280a6 (diff)
downloadphp-git-33ed73cb515a642b70611b5322ae65c6b79f6f07.tar.gz
make it totally safe again
-rw-r--r--win32/winutil.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/win32/winutil.c b/win32/winutil.c
index 9f1bfa42fe..59b7aff685 100644
--- a/win32/winutil.c
+++ b/win32/winutil.c
@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 4 |
+ | PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2003 The PHP Group |
+----------------------------------------------------------------------+
@@ -16,20 +16,13 @@
+----------------------------------------------------------------------+
*/
+/* $Id$ */
+
#include "php.h"
PHPAPI char *php_win_err(int error)
{
- static char *buf = NULL;
-
-#if MBO_0
- /* leak for now */
- if (buf) {
- free(buf);
- }
-#endif
-
- buf = NULL;
+ char *buf = NULL;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,