Skip to content

Commit 26b037f

Browse files
committed
merge revision(s) 61561: [Backport ruby#14272]
fix memory leak (FOUND BY A COMPILER WARNING) Confusion of argument order ignores this st_free_table. Results in garbaged table not GCed. Easily noticable when you read the compiper warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@61661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 70c59ba commit 26b037f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4953,7 +4953,7 @@ rb_ary_sample(int argc, VALUE *argv, VALUE ary)
49534953
long max_idx = 0;
49544954
#undef RUBY_UNTYPED_DATA_WARNING
49554955
#define RUBY_UNTYPED_DATA_WARNING 0
4956-
VALUE vmemo = Data_Wrap_Struct(0, 0, 0, st_free_table);
4956+
VALUE vmemo = Data_Wrap_Struct(0, 0, st_free_table, 0);
49574957
st_table *memo = st_init_numtable_with_size(n);
49584958
DATA_PTR(vmemo) = memo;
49594959
result = rb_ary_new_capa(n);

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define RUBY_VERSION "2.5.0"
22
#define RUBY_RELEASE_DATE "2018-01-08"
3-
#define RUBY_PATCHLEVEL 10
3+
#define RUBY_PATCHLEVEL 11
44

55
#define RUBY_RELEASE_YEAR 2018
66
#define RUBY_RELEASE_MONTH 1

0 commit comments

Comments
 (0)