cvs: ZendEngine2 / zend_constants.c
| From: | Marcus Boerger | Date: | Tue, 13 Jul 2004 19:22:11 +0000 |
| Subject: | cvs: ZendEngine2 / zend_constants.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2732@lists.php.net to get a copy of this message | ||
helly Tue Jul 13 15:22:11 2004 EDT
Modified files:
/ZendEngine2 zend_constants.c
Log:
Bugfix #29116 Zend constant warning uses memory after free (jdolecek at NetBSD dot org)
http://cvs.php.net/diff.php/ZendEngine2/zend_constants.c?r1=1.68&r2=1.69&ty=u
Index: ZendEngine2/zend_constants.c
diff -u ZendEngine2/zend_constants.c:1.68 ZendEngine2/zend_constants.c:1.69
--- ZendEngine2/zend_constants.c:1.68 Thu Jul 1 12:28:32 2004
+++ ZendEngine2/zend_constants.c Tue Jul 13 15:22:11 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_constants.c,v 1.68 2004/07/01 16:28:32 iliaa Exp $ */
+/* $Id: zend_constants.c,v 1.69 2004/07/13 19:22:11 helly Exp $ */
#include "zend.h"
#include "zend_constants.h"
@@ -317,11 +317,11 @@
}
if (zend_hash_add(EG(zend_constants), name, c->name_len, (void *) c, sizeof(zend_constant),
NULL)==FAILURE) {
+ zend_error(E_NOTICE,"Constant %s already defined", name);
free(c->name);
if (!(c->flags & CONST_PERSISTENT)) {
zval_dtor(&c->value);
}
- zend_error(E_NOTICE,"Constant %s already defined", name);
ret = FAILURE;
}
if (lowercase_name) {