aboutsummaryrefslogtreecommitdiff
path: root/src/im-sandbox.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-12-14 22:33:54 +0100
committerThomas White <taw@physics.org>2021-12-17 16:27:51 +0100
commit3358c0312b3b1f6a679735339d277f599a5ba964 (patch)
tree53cdc172ffe4fba8f4a783cc68596561fcab22f9 /src/im-sandbox.c
parentf17e7abda4a916404fe7c7d186e03dbeabea792f (diff)
indexamajig: Avoid fclose(NULL)
When running online, there's no input file handle to close.
Diffstat (limited to 'src/im-sandbox.c')
-rw-r--r--src/im-sandbox.c4
1 files changed, 3 insertions, 1 deletions
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 */