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

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

@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
#define PATCHLEVEL 8
#define PATCHLEVEL 9
#endif /* _PATCHLEVEL_H_ */