summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--transcode.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 15cfb7e8d..e2271c4fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/transcode.c b/transcode.c
index bfc3382de..5cc93da63 100644
--- a/transcode.c
+++ b/transcode.c
@@ -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;