php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #64544
Patch bug64544.patch revision 2013-03-29 03:52 UTC by laruence@php.net
revision 2013-03-29 03:11 UTC by laruence@php.net

Patch bug64544.patch for CGI/CLI related Bug #64544

Patch version 2013-03-29 03:11 UTC

Return to Bug #64544 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions:

Developer: laruence@php.net

diff --git a/sapi/cli/ps_title.c b/sapi/cli/ps_title.c
index a2e47f0..0da1dff 100644
--- a/sapi/cli/ps_title.c
+++ b/sapi/cli/ps_title.c
@@ -123,6 +123,7 @@ static size_t ps_buffer_cur_len; /* actual string length in ps_buffer */
 /* save the original argv[] location here */
 static int save_argc;
 static char** save_argv;
+static char** new_environ;
 
 
 /*
@@ -145,7 +146,6 @@ char** save_ps_args(int argc, char** argv)
     {
         char* end_of_area = NULL;
         int non_contiguous_area = 0;
-        char** new_environ;
         int i;
 
         /*
@@ -188,7 +188,6 @@ char** save_ps_args(int argc, char** argv)
         }
         new_environ[i] = NULL;
         environ = new_environ;
-
     }
 #endif /* PS_USE_CLOBBER_ARGV */
 
@@ -405,9 +404,9 @@ void cleanup_ps_args(char **argv)
 #ifdef PS_USE_CLOBBER_ARGV
         {
             int i;
-            for (i = 0; environ[i] != NULL; i++)
-                free(environ[i]);
-            free(environ);
+            for (i = 0; new_environ[i] != NULL; i++)
+                free(new_environ[i]);
+            free(new_environ);
         }
 #endif /* PS_USE_CLOBBER_ARGV */
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 09 08:01:27 2024 UTC