php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch fix_unintialized_doc_root for PHP options/info functions Bug #54197

Patch version 2012-03-01 10:23 UTC

Return to Bug #54197 | Download this patch
Patch Revisions:

Developer: ab@php.net

Index: sapi/cgi/cgi_main.c
===================================================================
--- sapi/cgi/cgi_main.c	(Revision 323692)
+++ sapi/cgi/cgi_main.c	(Arbeitskopie)
@@ -846,12 +846,12 @@
 				zend_str_tolower(doc_root, doc_root_len);
 #endif
 				php_cgi_ini_activate_user_config(path, path_len, doc_root, doc_root_len, doc_root_len - 1 TSRMLS_CC);
+#ifdef PHP_WIN32
+				efree(doc_root);
+#endif
 			}
 		}
 
-#ifdef PHP_WIN32
-		efree(doc_root);
-#endif
 		efree(path);
 	}
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 04:01:29 2024 UTC