php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch bug64544.patch for CGI/CLI related Bug #64544Patch version 2013-03-29 03:11 UTC Return to Bug #64544 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:Developer: laruence@php.netdiff --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 */ |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Wed Oct 09 07:01:28 2024 UTC |