Merge branch 'master' into phpng
[m6w6/ext-http] / php_http_message_parser.c
index 440a5f3d5dbac9e6ee91522480428421f335a6d6..e40e7b3e79c1edb282da9dd16406b8ddc7e65920 100644 (file)
@@ -517,7 +517,7 @@ php_http_message_parser_object_t *php_http_message_parser_object_new_ex(zend_cla
 {
        php_http_message_parser_object_t *o;
 
-       o = ecalloc(1, sizeof(php_http_message_parser_object_t) + (ce->default_properties_count - 1) * sizeof(zval));
+       o = ecalloc(1, sizeof(*o) + zend_object_properties_size(ce));
        zend_object_std_init(&o->zo, ce);
        object_properties_init(&o->zo, ce);