mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 00:03:03 +00:00
tests: fix memory leak
This was reported by ASAN on the CI. * tests/types.at (api.value.type): Don't set a semantic value to EOF.
This commit is contained in:
@@ -180,9 +180,13 @@ m4_foreach([b4_skel], [[yacc.c], [glr.c], [lalr1.cc], [glr.cc]],
|
|||||||
free ($<up>2);
|
free ($<up>2);
|
||||||
}],
|
}],
|
||||||
["12"],
|
["12"],
|
||||||
[AT_VAL.up = (struct u *) malloc (sizeof *AT_VAL.up);
|
[if (res)
|
||||||
assert (AT_VAL.up);
|
{
|
||||||
AT_VAL.up->ival = res - '0';],
|
AT_VAL.up = (struct u *) malloc (sizeof *AT_VAL.up);
|
||||||
|
assert (AT_VAL.up);
|
||||||
|
AT_VAL.up->ival = res - '0';
|
||||||
|
}
|
||||||
|
],
|
||||||
[1 2])
|
[1 2])
|
||||||
|
|
||||||
# A user defined union.
|
# A user defined union.
|
||||||
|
|||||||
Reference in New Issue
Block a user