]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.0 patch 9: fix file descriptor leak with zero-length history file
authorChet Ramey <chet.ramey@case.edu>
Wed, 14 Aug 2019 18:58:44 +0000 (14:58 -0400)
committerChet Ramey <chet.ramey@case.edu>
Wed, 14 Aug 2019 18:58:44 +0000 (14:58 -0400)
lib/readline/histfile.c
patchlevel.h

index dc64bde1c5acf8c117080eb7c783a2cd3181311d..a8a92aa3604a52216ff29a353e282482d80c4184 100644 (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 */
     }
 
index 16c8740455079ee12e9773dd1eb8860313fbdffd..02f1d60661bd9a49db6de067149812fed7b2e9d2 100644 (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_ */