Bash-5.0 patch 9: fix file descriptor leak with zero-length history file

This commit is contained in:
Chet Ramey
2019-08-14 14:58:44 -04:00
parent 01323582f7
commit 9f597fd109
2 changed files with 2 additions and 1 deletions
+1
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 */
}