summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-10 08:30:52 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-10 08:30:52 +0000
commitf32f8cd3a7e1ae135525a458fc5f11adc5bedecf (patch)
tree7b4c824960cf96a688b1c84a779131d3a3ea1e48
parent9e188ea945df1caf19f5e7bd2af1513e90829e74 (diff)
* ext/tcltklib/stubs.c (ruby_tcltk_stubs): fix memory leak.
[ruby-dev:18478] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/tcltklib/stubs.c11
-rw-r--r--version.h4
3 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 06f08b728e..0b2348664d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Oct 10 17:26:12 2002 WATANABE Hirofumi <eban@ruby-lang.org>
+
+ * ext/tcltklib/stubs.c (ruby_tcltk_stubs): fix memory leak.
+ [ruby-dev:18478]
+
Thu Oct 10 15:20:18 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* eval.c (ruby_init): Init_stack() with local location.
diff --git a/ext/tcltklib/stubs.c b/ext/tcltklib/stubs.c
index 0c9e9872d7..9709aca3fb 100644
--- a/ext/tcltklib/stubs.c
+++ b/ext/tcltklib/stubs.c
@@ -34,8 +34,8 @@ ruby_tcltk_stubs()
int (*p_Tk_Init) _((Tcl_Interp *));
Tcl_Interp *tcl_ip;
int n;
- char *ruby_tcl_dll;
- char *ruby_tk_dll;
+ char *ruby_tcl_dll = 0;
+ char *ruby_tk_dll = 0;
char tcl_name[20];
char tk_name[20];
@@ -47,9 +47,6 @@ ruby_tcltk_stubs()
if (ruby_tcl_dll && ruby_tk_dll) {
tcl_dll = (DL_HANDLE)DL_OPEN(ruby_tcl_dll);
tk_dll = (DL_HANDLE)DL_OPEN(ruby_tk_dll);
-#if defined NT
- ruby_xfree(ruby_tcl_dll);
-#endif
} else {
snprintf(tcl_name, sizeof tcl_name, TCL_NAME, DLEXT);
snprintf(tk_name, sizeof tk_name, TK_NAME, DLEXT);
@@ -64,6 +61,10 @@ ruby_tcltk_stubs()
}
}
+#if defined NT
+ if (ruby_tcl_dll) ruby_xfree(ruby_tcl_dll);
+#endif
+
if (!tcl_dll || !tk_dll)
return -1;
diff --git a/version.h b/version.h
index 13a34e3b7f..0ce9bed071 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
#define RUBY_VERSION "1.6.8"
-#define RUBY_RELEASE_DATE "2002-10-07"
+#define RUBY_RELEASE_DATE "2002-10-10"
#define RUBY_VERSION_CODE 168
-#define RUBY_RELEASE_CODE 20021007
+#define RUBY_RELEASE_CODE 20021010