Unverified Commit 09a99154 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #4128 from take-cheeze/patch-1

Fix memory leak in `mrb_str_count`
parents 152e8c5b 67897195
...@@ -718,6 +718,7 @@ mrb_str_count(mrb_state *mrb, mrb_value str) ...@@ -718,6 +718,7 @@ mrb_str_count(mrb_state *mrb, mrb_value str)
if (n >= 0) count++; if (n >= 0) count++;
} }
tr_pattern_free(mrb, pat);
return mrb_fixnum_value(count); return mrb_fixnum_value(count);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment