diff options
author | Chet Ramey <chet.ramey@case.edu> | 2019-08-14 14:58:44 -0400 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2019-08-14 14:58:44 -0400 |
commit | 9f597fd10993313262cab400bf3c46ffb3f6fd1e (patch) | |
tree | a2fa6a7ecccae90d5186b01b8e5792b2598a24d7 | |
parent | 01323582f773ef4d08fa26a90e9a21285a8405f5 (diff) | |
download | bash-9f597fd10993313262cab400bf3c46ffb3f6fd1e.tar.gz |
Bash-5.0 patch 9: fix file descriptor leak with zero-length history file
-rw-r--r-- | lib/readline/histfile.c | 1 | ||||
-rw-r--r-- | patchlevel.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/readline/histfile.c b/lib/readline/histfile.c index dc64bde1..a8a92aa3 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 16c87404..02f1d606 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_ */ |