* variable.c (remove_trace): should not access already freed area.

* variable.c (rb_f_untrace_var): fix memory leak.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2001-10-21 13:22:54 +00:00
parent eaab0aa79a
commit d0129370f0
3 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,9 @@
Fri Oct 19 23:40:37 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* variable.c (remove_trace): should not access already freed area.
* variable.c (rb_f_untrace_var): fix memory leak.
Fri Oct 19 17:55:14 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp> Fri Oct 19 17:55:14 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* marshal.c (w_uclass): cloned class is not user * marshal.c (w_uclass): cloned class is not user

View File

@ -598,7 +598,9 @@ remove_trace(entry)
trace->next = next->next; trace->next = next->next;
free(next); free(next);
} }
trace = next; else {
trace = next;
}
} }
entry->trace = t.next; entry->trace = t.next;
} }
@ -629,7 +631,6 @@ rb_f_untrace_var(argc, argv)
trace->removed = 1; trace->removed = 1;
trace = next; trace = next;
} }
entry->trace = 0;
if (!entry->block_trace) remove_trace(entry); if (!entry->block_trace) remove_trace(entry);
return ary; return ary;

View File

@ -1,4 +1,4 @@
#define RUBY_VERSION "1.7.1" #define RUBY_VERSION "1.7.1"
#define RUBY_RELEASE_DATE "2001-10-19" #define RUBY_RELEASE_DATE "2001-10-21"
#define RUBY_VERSION_CODE 171 #define RUBY_VERSION_CODE 171
#define RUBY_RELEASE_CODE 20011019 #define RUBY_RELEASE_CODE 20011021