Skip to content

Commit 0eb262e

Browse files
committed
Use dtor unconditionally in error case
1 parent d4dee4a commit 0eb262e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_object_handlers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,12 +603,12 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_
603603
goto exit;
604604
} else {
605605
if (Z_STRVAL_P(member)[0] == '\0') {
606+
zval_ptr_dtor(&tmp_object);
606607
if (Z_STRLEN_P(member) == 0) {
607608
zend_throw_error(NULL, "Cannot access empty property");
608609
retval = &EG(uninitialized_zval);
609610
goto exit;
610611
} else {
611-
zval_ptr_dtor(&tmp_object);
612612
zend_throw_error(NULL, "Cannot access property started with '\\0'");
613613
retval = &EG(uninitialized_zval);
614614
goto exit;

0 commit comments

Comments
 (0)