* transcode.c (rb_trans_open): free ts before raise.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5643c0d69a
commit
608cb2ed32
@ -1,3 +1,7 @@
|
||||
Tue Aug 12 18:51:11 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* transcode.c (rb_trans_open): free ts before raise.
|
||||
|
||||
Tue Aug 12 18:46:36 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c (BigDecimalCmp): should not ignore
|
||||
|
@ -648,6 +648,7 @@ rb_trans_open(const char *from, const char *to, int flags)
|
||||
for (i = 0; i < ts->num_trans; i++) {
|
||||
tc = rb_transcoding_open(ts->elems[i].from, ts->elems[i].to, 0);
|
||||
if (!tc) {
|
||||
xfree(ts);
|
||||
rb_raise(rb_eArgError, "converter open failed (from %s to %s)", from, to);
|
||||
}
|
||||
ts->elems[i].tc = tc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user