Readline-8.0 patch 1: fix file descriptor leak with zero-length history file
[deliverable/binutils-gdb.git] / readline / readline / histfile.c
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 */
     }
 
This page took 0.023105 seconds and 4 git commands to generate.