diff options
author | Chet Ramey <chet.ramey@case.edu> | 2019-08-14 11:28:48 -0400 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-06-30 15:10:46 -0600 |
commit | 8cfb541ad1edfcc21b28eeb767e66b1001b0a84c (patch) | |
tree | f299598f548e3fa1403386e051e5df53f2f4ff68 | |
parent | 2a17c803f6e70f26a1ce0c0b8c3c05a9b963b19b (diff) | |
download | binutils-gdb-8cfb541ad1edfcc21b28eeb767e66b1001b0a84c.tar.gz |
Readline-8.0 patch 1: fix file descriptor leak with zero-length history file
-rw-r--r-- | readline/readline/histfile.c | 1 | ||||
-rw-r--r-- | readline/readline/patchlevel | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/readline/readline/histfile.c b/readline/readline/histfile.c index dc64bde1c5a..a8a92aa3604 100644 --- a/readline/readline/histfile.c +++ b/readline/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/readline/readline/patchlevel b/readline/readline/patchlevel index d8c9df7e6bb..fdf474049fc 100644 --- a/readline/readline/patchlevel +++ b/readline/readline/patchlevel @@ -1,3 +1,3 @@ # Do not edit -- exists only for use by patch -0 +1 |