Skip to content

Commit

Permalink
Fix memory leak for { $foo: bar }
Browse files Browse the repository at this point in the history
{ BINDING: ExpD } wasn't freeing BINDING.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60865
  • Loading branch information
emanuele6 committed Jul 28, 2023
1 parent 4160a36 commit 5007ec8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
35 changes: 18 additions & 17 deletions src/parser.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,7 @@ IDENT ':' ExpD {
| BINDING ':' ExpD {
$$ = gen_dictpair(gen_location(@$, locations, gen_op_unbound(LOADV, jv_string_value($1))),
$3);
jv_free($1);
}
| BINDING {
$$ = gen_dictpair(gen_const($1),
Expand Down

0 comments on commit 5007ec8

Please sign in to comment.