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 /readline | |
parent | 2a17c803f6e70f26a1ce0c0b8c3c05a9b963b19b (diff) | |
download | gdb-8cfb541ad1edfcc21b28eeb767e66b1001b0a84c.zip gdb-8cfb541ad1edfcc21b28eeb767e66b1001b0a84c.tar.gz gdb-8cfb541ad1edfcc21b28eeb767e66b1001b0a84c.tar.bz2 |
Readline-8.0 patch 1: fix file descriptor leak with zero-length history file
Diffstat (limited to 'readline')
-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 dc64bde..a8a92aa 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 d8c9df7..fdf4740 100644 --- a/readline/readline/patchlevel +++ b/readline/readline/patchlevel @@ -1,3 +1,3 @@ # Do not edit -- exists only for use by patch -0 +1 |