From 3358c0312b3b1f6a679735339d277f599a5ba964 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 14 Dec 2021 22:33:54 +0100 Subject: indexamajig: Avoid fclose(NULL) When running online, there's no input file handle to close. --- src/im-sandbox.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/im-sandbox.c') diff --git a/src/im-sandbox.c b/src/im-sandbox.c index 8525227d..2a15a217 100644 --- a/src/im-sandbox.c +++ b/src/im-sandbox.c @@ -1228,7 +1228,9 @@ int create_sandbox(struct index_args *iargs, int n_proc, char *prefix, } while ( !allDone ); - fclose(fh); + if ( fh != NULL ) { + fclose(fh); + } /* Indicate to the workers that we are finished, and wake them up one * last time */ -- cgit v1.2.3