summaryrefslogtreecommitdiff
path: root/ext/simplexml/simplexml.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/simplexml/simplexml.c')
-rw-r--r--ext/simplexml/simplexml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index ceba129560..b125d16f71 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -2057,7 +2057,7 @@ static php_sxe_object* php_sxe_object_new(zend_class_entry *ce)
zend_class_entry *parent = ce;
int inherited = 0;
- intern = ecalloc(1, sizeof(php_sxe_object) + sizeof(zval) * (parent->default_properties_count - 1));
+ intern = ecalloc(1, sizeof(php_sxe_object) + zend_object_properties_size(parent));
intern->iter.type = SXE_ITER_NONE;
intern->iter.nsprefix = NULL;