Skip to content

Commit c6d0905

Browse files
committed
Do not copy return_value in parser
1 parent c51ea47 commit c6d0905

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/json/json_parser.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void php_json_parser_array_append(zval *array, zval *zvalue);
8585
%% /* Rules */
8686

8787
start:
88-
value PHP_JSON_T_EOI { $$ = $1; ZVAL_DUP(parser->return_value, &$1); PHP_JSON_USE($2); YYACCEPT; }
88+
value PHP_JSON_T_EOI { $$ = $1; *parser->return_value = $1; PHP_JSON_USE($2); YYACCEPT; }
8989
| value errlex { PHP_JSON_USE_2($$, $1, $2); }
9090
;
9191

0 commit comments

Comments
 (0)