Readline-8.0 patch 1: fix file descriptor leak with zero-length history file

This commit is contained in:
Chet Ramey 2019-08-14 11:28:48 -04:00 committed by Tom Tromey
parent 2a17c803f6
commit 8cfb541ad1
2 changed files with 2 additions and 1 deletions

View File

@ -305,6 +305,7 @@ read_history_range (const char *filename, int from, int to)
if (file_size == 0)
{
free (input);
close (file);
return 0; /* don't waste time if we don't have to */
}

View File

@ -1,3 +1,3 @@
# Do not edit -- exists only for use by patch
0
1