1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

parse.y: fix a wrong sizeof argument for ruby_sized_xfree

This commit is contained in:
Yusuke Endoh 2020-01-05 11:37:40 +09:00
parent 44a164c26f
commit 5b0c3754d8

View file

@ -5854,7 +5854,7 @@ vtable_free_gen(struct parser_params *p, int line, const char *name,
if (tbl->tbl) {
ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
}
ruby_sized_xfree(tbl, sizeof(tbl));
ruby_sized_xfree(tbl, sizeof(*tbl));
}
}
#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)