[前][次][番号順一覧][スレッド一覧]

ruby-changes:59619

From: Yusuke <ko1@a...>
Date: Sun, 5 Jan 2020 11:39:53 +0900 (JST)
Subject: [ruby-changes:59619] 5b0c3754d8 (master): parse.y: fix a wrong sizeof argument for ruby_sized_xfree

https://git.ruby-lang.org/ruby.git/commit/?id=5b0c3754d8

From 5b0c3754d8578564e12df7182fff4a36b0a29938 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Sun, 5 Jan 2020 11:37:40 +0900
Subject: parse.y: fix a wrong sizeof argument for ruby_sized_xfree


diff --git a/parse.y b/parse.y
index 75cd097..d1d2569 100644
--- a/parse.y
+++ b/parse.y
@@ -5854,7 +5854,7 @@ vtable_free_gen(struct parser_params *p, int line, const char *name, https://github.com/ruby/ruby/blob/trunk/parse.y#L5854
 	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)
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]