1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/tcltklib/stubs.c (ruby_tcltk_stubs): fix memory leak.

[ruby-dev:18478]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2002-10-10 08:30:52 +00:00
parent 99ebeaee0a
commit 129d05ae8d
3 changed files with 13 additions and 7 deletions

View file

@ -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> Thu Oct 10 15:20:18 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* lib/weakref.rb (WeakRef::@@final): use Hash#delete. * lib/weakref.rb (WeakRef::@@final): use Hash#delete.

View file

@ -34,8 +34,8 @@ ruby_tcltk_stubs()
int (*p_Tk_Init) _((Tcl_Interp *)); int (*p_Tk_Init) _((Tcl_Interp *));
Tcl_Interp *tcl_ip; Tcl_Interp *tcl_ip;
int n; int n;
char *ruby_tcl_dll; char *ruby_tcl_dll = 0;
char *ruby_tk_dll; char *ruby_tk_dll = 0;
char tcl_name[20]; char tcl_name[20];
char tk_name[20]; char tk_name[20];
@ -47,9 +47,6 @@ ruby_tcltk_stubs()
if (ruby_tcl_dll && ruby_tk_dll) { if (ruby_tcl_dll && ruby_tk_dll) {
tcl_dll = (DL_HANDLE)DL_OPEN(ruby_tcl_dll); tcl_dll = (DL_HANDLE)DL_OPEN(ruby_tcl_dll);
tk_dll = (DL_HANDLE)DL_OPEN(ruby_tk_dll); tk_dll = (DL_HANDLE)DL_OPEN(ruby_tk_dll);
#if defined NT
ruby_xfree(ruby_tcl_dll);
#endif
} else { } else {
snprintf(tcl_name, sizeof tcl_name, TCL_NAME, DLEXT); snprintf(tcl_name, sizeof tcl_name, TCL_NAME, DLEXT);
snprintf(tk_name, sizeof tk_name, TK_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) if (!tcl_dll || !tk_dll)
return -1; return -1;

View file

@ -1,4 +1,4 @@
#define RUBY_VERSION "1.7.3" #define RUBY_VERSION "1.7.3"
#define RUBY_RELEASE_DATE "2002-10-09" #define RUBY_RELEASE_DATE "2002-10-10"
#define RUBY_VERSION_CODE 173 #define RUBY_VERSION_CODE 173
#define RUBY_RELEASE_CODE 20021009 #define RUBY_RELEASE_CODE 20021010