ruby-changes:10502
From: kazu <ko1@a...>
Date: Thu, 5 Feb 2009 07:42:23 +0900 (JST)
Subject: [ruby-changes:10502] Ruby:r22054 (trunk): * ext/readline/readline.c (Init_readline): entry may be NULL.
kazu 2009-02-05 07:42:06 +0900 (Thu, 05 Feb 2009) New Revision: 22054 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22054 Log: * ext/readline/readline.c (Init_readline): entry may be NULL. [ruby-dev:37891] Modified files: trunk/ChangeLog trunk/ext/readline/readline.c Index: ChangeLog =================================================================== --- ChangeLog (revision 22053) +++ ChangeLog (revision 22054) @@ -1,3 +1,8 @@ +Thu Feb 5 07:39:33 2009 Kazuhiro NISHIYAMA <zn@m...> + + * ext/readline/readline.c (Init_readline): entry may be NULL. + [ruby-dev:37891] + Thu Feb 5 03:55:22 2009 Yukihiro Matsumoto <matz@r...> * time.c (LOCALTIME): should call tzset() before localtime_r(). Index: ext/readline/readline.c =================================================================== --- ext/readline/readline.c (revision 22053) +++ ext/readline/readline.c (revision 22054) @@ -1349,8 +1349,10 @@ #else { HIST_ENTRY *entry = remove_history(0); - free((char *)entry->line); - free(entry); + if (entry) { + free((char *)entry->line); + free(entry); + } } #endif } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/