Re: cvs: php4 /ext/standard var.c
| From: | Andi Gutmans | Date: | Sat, 17 Jun 2000 14:29:04 +0000 |
| Subject: | Re: cvs: php4 /ext/standard var.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-335@lists.php.net to get a copy of this message | ||
Please change it to zval_ptr_dtor() in all places where you touch zval's returned from user functions. You are not always supposed to destroy it. zval_ptr_dtor() will take care of that.
Thanks,
Andi
At 07:53 PM 6/16/00 +0000, Andrei Zmievski wrote:
--- Andi Gutmans <andi@zend.com> http://www.zend.com/andrei Fri Jun 16 12:53:06 2000 EDTModified files:/php4/ext/standard var.cLog: Plug a memory leak: retval_ptr should be destroyed. Index: php4/ext/standard/var.c diff -u php4/ext/standard/var.c:1.60 php4/ext/standard/var.c:1.61--- php4/ext/standard/var.c:1.60 Fri Jun 16 11:36:30 2000 +++ php4/ext/standard/var.c Fri Jun 16 12:53:06 2000@@ -17,7 +17,7 @@+----------------------------------------------------------------------+*/ -/* $Id: var.c,v 1.60 2000/06/16 18:36:30 andrei Exp $ */ +/* $Id: var.c,v 1.61 2000/06/16 19:53:06 andrei Exp $ */ /* {{{ includes @@ -521,6 +521,10 @@zval_dtor(fname); FREE_ZVAL(fname); + if (retval_ptr) { + zval_dtor(retval_ptr); + FREE_ZVAL(retval_ptr); + } }return *((*p)++) == '}';-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net