From f585708e822e021e15e5bece1de482b63ba581df Mon Sep 17 00:00:00 2001
From: Chet Ramey <chet.ramey@case.edu>
Date: Wed, 14 Aug 2019 11:28:48 -0400
Subject: [PATCH 1/4] Readline-8.0 patch 1: fix file descriptor leak with
 zero-length history file

---
 histfile.c | 1 +
 patchlevel | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/histfile.c b/histfile.c
index dc64bde..a8a92aa 100644
--- a/histfile.c
+++ b/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 b/patchlevel
index d8c9df7..fdf4740 100644
--- a/patchlevel
+++ b/patchlevel
@@ -1,3 +1,3 @@
 # Do not edit -- exists only for use by patch
 
-0
+1
-- 
1.8.3.1

