File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -718,6 +718,7 @@ y_write_object_callback (
718
718
zval * ztag ;
719
719
zval * zdata ;
720
720
zend_string * str_key ;
721
+ int result ;
721
722
722
723
/* call the user function */
723
724
if (FAILURE == call_user_function (EG (function_table ), NULL ,
@@ -734,6 +735,7 @@ y_write_object_callback (
734
735
php_error_docref (NULL , E_WARNING ,
735
736
"Expected callback for class '%s'"
736
737
" to return an array" , clazz_name );
738
+ zval_ptr_dtor (& zret );
737
739
return FAILURE ;
738
740
}
739
741
@@ -760,10 +762,12 @@ y_write_object_callback (
760
762
}
761
763
zend_string_release (str_key );
762
764
763
-
764
765
/* emit surrogate object and tag */
765
- return y_write_zval (
766
+ result = y_write_zval (
766
767
state , zdata , (yaml_char_t * ) Z_STRVAL_P (ztag ));
768
+
769
+ zval_ptr_dtor (& zret );
770
+ return result ;
767
771
}
768
772
/* }}} */
769
773
You can’t perform that action at this time.
0 commit comments