summaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-16 14:38:08 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-16 14:38:08 +0000
commitd8469317df789e3d52d0e23f994fef72853f6b3b (patch)
tree22abb797952aebb736b53a3ab9d559e857261e2e /compile.c
parentaaa8924c84df5b8a68cafd6b4a3a1d92be2f5ba2 (diff)
downloadruby-d8469317df789e3d52d0e23f994fef72853f6b3b.tar.gz
ruby-d8469317df789e3d52d0e23f994fef72853f6b3b.tar.xz
ruby-d8469317df789e3d52d0e23f994fef72853f6b3b.zip
* compile.c (iseq_set_sequence): fix memory leak.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index 6eeb2e4c4..9ceacd6f0 100644
--- a/compile.c
+++ b/compile.c
@@ -1309,6 +1309,8 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
rb_compile_error(RSTRING_PTR(iseq->filename), iobj->line_no,
"operand size miss! (%d for %d)",
iobj->operand_size, len - 1);
+ xfree(generated_iseq);
+ xfree(insn_info_table);
return 0;
}
@@ -1403,6 +1405,8 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
default:
rb_compile_error(RSTRING_PTR(iseq->filename), iobj->line_no,
"unknown operand type: %c", type);
+ xfree(generated_iseq);
+ xfree(insn_info_table);
return 0;
}
}