com php-src: use efree_size here: Zend/zend_compile .c Zend/zend_inheritance.c
| From: | Xinchen Hui | Date: | Wed, 12 Aug 2015 03:15:09 +0000 |
| Subject: | com php-src: use efree_size here: Zend/zend_compile .c Zend/zend_inheritance.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88484@lists.php.net to get a copy of this message | ||
Commit: 121409865bfd20c96008b054ff0ae7d7d5c15587
Author: Xinchen Hui <laruence@php.net> Wed, 12 Aug 2015 11:15:09 +0800
Parents: fef086d11326f8f3c16628e6d64ef56e26c648ec
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=121409865bfd20c96008b054ff0ae7d7d5c15587
Log:
use efree_size here
Changed paths:
M Zend/zend_compile.c
M Zend/zend_inheritance.c
Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 9c54245..c73ca98 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -879,9 +879,9 @@ zend_string *zend_resolve_class_name_ast(zend_ast *ast) /* {{{ */
}
/* }}} */
-static void ptr_dtor(zval *zv) /* {{{ */
+static void label_ptr_dtor(zval *zv) /* {{{ */
{
- efree(Z_PTR_P(zv));
+ efree_size(Z_PTR_P(zv), sizeof(zend_label));
}
/* }}} */
@@ -3747,7 +3747,7 @@ void zend_compile_label(zend_ast *ast) /* {{{ */
if (!CG(context).labels) {
ALLOC_HASHTABLE(CG(context).labels);
- zend_hash_init(CG(context).labels, 8, NULL, ptr_dtor, 0);
+ zend_hash_init(CG(context).labels, 8, NULL, label_ptr_dtor, 0);
}
dest.brk_cont = CG(context).current_brk_cont;
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index c794c96..77ea7d5 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance..c
@@ -25,9 +25,9 @@
#include "zend_smart_str.h"
#include "zend_inheritance.h"
-static void ptr_dtor(zval *zv) /* {{{ */
+static void overriden_ptr_dtor(zval *zv) /* {{{ */
{
- efree(Z_PTR_P(zv));
+ efree_size(Z_PTR_P(zv), sizeof(zend_function));
}
/* }}} */
@@ -1098,7 +1098,7 @@ static void zend_add_trait_method(zend_class_entry *ce, const char *name,
zend_s
}
} else {
ALLOC_HASHTABLE(*overriden);
- zend_hash_init_ex(*overriden, 8, NULL, ptr_dtor, 0, 0);
+ zend_hash_init_ex(*overriden, 8, NULL, overriden_ptr_dtor, 0, 0);
}
zend_hash_update_mem(*overriden, key, fn, sizeof(zend_function));
return;