diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-04-21 06:22:43 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-04-21 06:22:43 +0000 |
commit | 09cc0b160eb14aa52e7cd345835485122e9c8c89 (patch) | |
tree | 2444b940ab0472e384a68b1c019fef2bfa51f47b /ext | |
parent | 55cc0dd1487cb3e86d1b591d5480e03288c11fb5 (diff) | |
download | ruby-09cc0b160eb14aa52e7cd345835485122e9c8c89.tar.gz |
* ext/tk/tcltklib.c (lib_eventloop_ensure): refer freed pointer
[ruby-core:07744] and memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/tk/tcltklib.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index ebc2ac5d76..03de109b49 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -4,7 +4,7 @@ * Oct. 24, 1997 Y. Matsumoto */ -#define TCLTKLIB_RELEASE_DATE "2006-04-18" +#define TCLTKLIB_RELEASE_DATE "2006-04-21" #include "ruby.h" #include "rubysig.h" @@ -1696,6 +1696,8 @@ lib_eventloop_ensure(args) rb_thread_critical = ptr->thr_crit_bup; + free(ptr); + return Qnil; } @@ -1724,10 +1726,10 @@ lib_eventloop_ensure(args) } } - free(ptr); - rb_thread_critical = ptr->thr_crit_bup; + free(ptr); + DUMP2("finish current eventloop %lx", current_evloop); return Qnil; } |