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

Fix memory leak in `mrb_str_count`
This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-09-25 12:03:26 +09:00
committed by GitHub
+1
View File
@@ -718,6 +718,7 @@ mrb_str_count(mrb_state *mrb, mrb_value str)
if (n >= 0) count++;
}
tr_pattern_free(mrb, pat);
return mrb_fixnum_value(count);
}