From 97ed756e6220c8966d434cd225e8e904b62d0b92 Mon Sep 17 00:00:00 2001 From: "bas@zoetekouw.net" Date: Mon, 7 Aug 2017 23:02:16 +0200 Subject: [PATCH] Fix segfautl by closing unopened file --- src/filehandling_functions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filehandling_functions.c b/src/filehandling_functions.c index 7df08fd..dd0866c 100644 --- a/src/filehandling_functions.c +++ b/src/filehandling_functions.c @@ -211,7 +211,7 @@ dirpage_lookup(char **type, char ***message, long *lines, } /* if we haven't found anything, clean up and exit */ - if (!goodHit) + if (id && !goodHit) { fclose(id); id = 0; -- 2.33.0