diff options
| author | Clayton Smith <[email protected]> | 2016-11-24 15:51:25 -0500 |
|---|---|---|
| committer | Clayton Smith <[email protected]> | 2016-12-02 09:36:26 -0500 |
| commit | 1ff4b3f800d369510658b7926a1d6dc9327d0422 (patch) | |
| tree | 12bba0f9a3a40c769d287c7823f28c14bab5d5bc /src/proc.c | |
| parent | 2cca9d368815e9c83a7489c40d69937d68cb43a2 (diff) | |
| download | mruby-1ff4b3f800d369510658b7926a1d6dc9327d0422.tar.gz mruby-1ff4b3f800d369510658b7926a1d6dc9327d0422.zip | |
Fix segfault in mrb_proc_copy.
Diffstat (limited to 'src/proc.c')
| -rw-r--r-- | src/proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/proc.c b/src/proc.c index 4f770932b..470547094 100644 --- a/src/proc.c +++ b/src/proc.c @@ -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; |
