From 8726366a4ca466a900988f1cca7a7fbc20e56fef Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 6 Feb 2018 16:23:44 -0800 Subject: [PATCH] Remember to close the input file after CSV parsing too --- main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.cpp b/main.cpp index c188a7a6..faa0c63a 100644 --- a/main.cpp +++ b/main.cpp @@ -1343,6 +1343,11 @@ int read_input(std::vector &sources, char *fname, int maxzoom, int minzo parse_geocsv(sst, sources[source].file, layer, sources[layer].layer); + if (close(fd) != 0) { + perror("close"); + exit(EXIT_FAILURE); + } + overall_offset = layer_seq[0]; checkdisk(&readers); continue;