summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index ca7c16e891..fcf8f2e499 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2850,7 +2850,7 @@ ZEND_API int zend_declare_property_null(zend_class_entry *ce, char *name, int na
zval *property;
if (ce->type & ZEND_INTERNAL_CLASS) {
- property = malloc(sizeof(zval));
+ ALLOC_PERMANENT_ZVAL(property);
} else {
ALLOC_ZVAL(property);
}
@@ -2864,7 +2864,7 @@ ZEND_API int zend_declare_property_bool(zend_class_entry *ce, char *name, int na
zval *property;
if (ce->type & ZEND_INTERNAL_CLASS) {
- property = malloc(sizeof(zval));
+ ALLOC_PERMANENT_ZVAL(property);
} else {
ALLOC_ZVAL(property);
}
@@ -2879,7 +2879,7 @@ ZEND_API int zend_declare_property_long(zend_class_entry *ce, char *name, int na
zval *property;
if (ce->type & ZEND_INTERNAL_CLASS) {
- property = malloc(sizeof(zval));
+ ALLOC_PERMANENT_ZVAL(property);
} else {
ALLOC_ZVAL(property);
}
@@ -2894,7 +2894,7 @@ ZEND_API int zend_declare_property_double(zend_class_entry *ce, char *name, int
zval *property;
if (ce->type & ZEND_INTERNAL_CLASS) {
- property = malloc(sizeof(zval));
+ ALLOC_PERMANENT_ZVAL(property);
} else {
ALLOC_ZVAL(property);
}
@@ -2910,7 +2910,7 @@ ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int
int len = strlen(value);
if (ce->type & ZEND_INTERNAL_CLASS) {
- property = malloc(sizeof(zval));
+ ALLOC_PERMANENT_ZVAL(property);
ZVAL_STRINGL(property, zend_strndup(value, len), len, 0);
} else {
ALLOC_ZVAL(property);
@@ -2926,7 +2926,7 @@ ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, char *name, int
zval *property;
if (ce->type & ZEND_INTERNAL_CLASS) {
- property = malloc(sizeof(zval));
+ ALLOC_PERMANENT_ZVAL(property);
ZVAL_STRINGL(property, zend_strndup(value, value_len), value_len, 0);
} else {
ALLOC_ZVAL(property);
@@ -2948,7 +2948,7 @@ ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, char *name,
zval *constant;
if (ce->type & ZEND_INTERNAL_CLASS) {
- constant = malloc(sizeof(zval));
+ ALLOC_PERMANENT_ZVAL(constant);
} else {
ALLOC_ZVAL(constant);
}
@@ -2963,7 +2963,7 @@ ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, char *name,
zval *constant;
if (ce->type & ZEND_INTERNAL_CLASS) {
- constant = malloc(sizeof(zval));
+ ALLOC_PERMANENT_ZVAL(constant);
} else {
ALLOC_ZVAL(constant);
}
@@ -2978,7 +2978,7 @@ ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, char *name,
zval *constant;
if (ce->type & ZEND_INTERNAL_CLASS) {
- constant = malloc(sizeof(zval));
+ ALLOC_PERMANENT_ZVAL(constant);
} else {
ALLOC_ZVAL(constant);
}
@@ -2993,7 +2993,7 @@ ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, char *name
zval *constant;
if (ce->type & ZEND_INTERNAL_CLASS) {
- constant = malloc(sizeof(zval));
+ ALLOC_PERMANENT_ZVAL(constant);
} else {
ALLOC_ZVAL(constant);
}
@@ -3008,7 +3008,7 @@ ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, char *nam
zval *constant;
if (ce->type & ZEND_INTERNAL_CLASS) {
- constant = malloc(sizeof(zval));
+ ALLOC_PERMANENT_ZVAL(constant);
ZVAL_STRINGL(constant, zend_strndup(value, value_length), value_length, 0);
} else {
ALLOC_ZVAL(constant);