Fw: [PHP-CVS] cvs: php-src /main php_variables.c
| From: | Antony Dovgal | Date: | Mon, 28 Mar 2005 19:43:22 +0000 |
| Subject: | Fw: [PHP-CVS] cvs: php-src /main php_variables.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-31146@lists.php.net to get a copy of this message | ||
Zeev, do you mind if I merge this patch to PHP_5_0 branch?
The leak is reproducible when PHP is build with --enable-debug and there is no "S" in
variables_order.
iliaa Mon Mar 28 13:46:58 2005 EDT
Modified files:
/php-src/main php_variables.c
Log:
Proper fix for the memory leak.
http://cvs.php.net/diff.php/php-src/main/php_variables.c?r1=1.86&r2=1.87&ty=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.86 php-src/main/php_variables.c:1.87
--- php-src/main/php_variables.c:1.86 Mon Mar 28 13:09:28 2005
+++ php-src/main/php_variables.c Mon Mar 28 13:46:57 2005
@@ -684,7 +684,6 @@
}
zend_hash_update(&EG(symbol_table), auto_global_records[i].name,
auto_global_records[i].name_len, &PG(http_globals)[i], sizeof(zval *), NULL);
- PG(http_globals)[i]->refcount++;
if (PG(register_long_arrays)) {
zend_hash_update(&EG(symbol_table), auto_global_records[i].long_name,
auto_global_records[i].long_name_len, &PG(http_globals)[i], sizeof(zval *), NULL);
PG(http_globals)[i]->refcount++;
--
Wbr,
Antony Dovgal aka tony2001
antony@zend.com