summaryrefslogtreecommitdiff
path: root/ext/standard/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/exec.c')
-rw-r--r--ext/standard/exec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index d914a1fd72..5b885c554d 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -564,7 +564,9 @@ PHP_FUNCTION(proc_nice)
php_ignore_value(nice(pri));
if (errno) {
#ifdef PHP_WIN32
- php_error_docref(NULL, E_WARNING, "%s", php_win_err());
+ char *err = php_win_err();
+ php_error_docref(NULL, E_WARNING, "%s", err);
+ php_win_err_free(err);
#else
php_error_docref(NULL, E_WARNING, "Only a super user may attempt to increase the priority of a process");
#endif