mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #3321 from clayton-shopify/fix-proc-crash-upstream
Fix segfault in mrb_proc_copy.
This commit is contained in:
+1
-1
@@ -140,7 +140,7 @@ mrb_proc_copy(struct RProc *a, struct RProc *b)
|
||||
{
|
||||
a->flags = b->flags;
|
||||
a->body = b->body;
|
||||
if (!MRB_PROC_CFUNC_P(a)) {
|
||||
if (!MRB_PROC_CFUNC_P(a) && a->body.irep) {
|
||||
a->body.irep->refcnt++;
|
||||
}
|
||||
a->target_class = b->target_class;
|
||||
|
||||
Reference in New Issue
Block a user