From 5b0c3754d8578564e12df7182fff4a36b0a29938 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Sun, 5 Jan 2020 11:37:40 +0900 Subject: [PATCH] parse.y: fix a wrong sizeof argument for ruby_sized_xfree --- parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse.y b/parse.y index 75cd097adb..d1d2569440 100644 --- a/parse.y +++ b/parse.y @@ -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)