mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 14:05:02 +02:00
merges r22054 and r22055 from trunk into ruby_1_9_1.
* ext/readline/readline.c (Init_readline): entry may be NULL. [ruby-dev:37891] -- change from assigned variable to called function git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
083d726b86
commit
71a800a5f3
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Feb 5 07:39:33 2009 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||||
|
|
||||||
|
* ext/readline/readline.c (Init_readline): remove_history(0) may be
|
||||||
|
NULL. [ruby-dev:37891]
|
||||||
|
|
||||||
Thu Feb 5 03:55:22 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Thu Feb 5 03:55:22 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* time.c (LOCALTIME): should call tzset() before localtime_r().
|
* time.c (LOCALTIME): should call tzset() before localtime_r().
|
||||||
|
|
|
@ -1287,8 +1287,10 @@ Init_readline()
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
HIST_ENTRY *entry = remove_history(0);
|
HIST_ENTRY *entry = remove_history(0);
|
||||||
free((char *)entry->line);
|
if (entry) {
|
||||||
free(entry);
|
free((char *)entry->line);
|
||||||
|
free(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue