From: Chet Ramey Date: Wed, 14 Aug 2019 18:58:44 +0000 (-0400) Subject: Bash-5.0 patch 9: fix file descriptor leak with zero-length history file X-Git-Tag: bash-5.1-alpha~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f597fd10993313262cab400bf3c46ffb3f6fd1e;p=thirdparty%2Fbash.git Bash-5.0 patch 9: fix file descriptor leak with zero-length history file --- diff --git a/lib/readline/histfile.c b/lib/readline/histfile.c index dc64bde1c..a8a92aa36 100644 --- a/lib/readline/histfile.c +++ b/lib/readline/histfile.c @@ -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 */ } diff --git a/patchlevel.h b/patchlevel.h index 16c874045..02f1d6066 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -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_ */