mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/readline/readline.c (Init_readline): entry may be NULL.
[ruby-dev:37891] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b5ae8db530
commit
37131afdd3
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): entry may be NULL.
|
||||
[ruby-dev:37891]
|
||||
|
||||
Thu Feb 5 03:55:22 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* time.c (LOCALTIME): should call tzset() before localtime_r().
|
||||
|
|
|
@ -1349,8 +1349,10 @@ Init_readline()
|
|||
#else
|
||||
{
|
||||
HIST_ENTRY *entry = remove_history(0);
|
||||
free((char *)entry->line);
|
||||
free(entry);
|
||||
if (entry) {
|
||||
free((char *)entry->line);
|
||||
free(entry);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue