dmitry Tue Apr 18 06:57:55 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/sapi/cgi cgi_main.c Log: Fixed memory leaks http://cvs.php.net/viewcvs.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.13&r2=1.267.2.14&diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.13 php-src/sapi/cgi/cgi_main.c:1.267.2.14 --- php-src/sapi/cgi/cgi_main.c:1.267.2.13 Fri Apr 7 13:45:23 2006 +++ php-src/sapi/cgi/cgi_main.c Tue Apr 18 06:57:55 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cgi_main.c,v 1.267.2.13 2006/04/07 13:45:23 dmitry Exp $ */ +/* $Id: cgi_main.c,v 1.267.2.14 2006/04/18 06:57:55 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -433,12 +433,16 @@ { if (PG(http_globals)[TRACK_VARS_ENV] && array_ptr != PG(http_globals)[TRACK_VARS_ENV]) { + zval_dtor(array_ptr); *array_ptr = *PG(http_globals)[TRACK_VARS_ENV]; + INIT_PZVAL(array_ptr); zval_copy_ctor(array_ptr); return; } else if (PG(http_globals)[TRACK_VARS_SERVER] && array_ptr != PG(http_globals)[TRACK_VARS_SERVER]) { + zval_dtor(array_ptr); *array_ptr = *PG(http_globals)[TRACK_VARS_SERVER]; + INIT_PZVAL(array_ptr); zval_copy_ctor(array_ptr); return; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php