diff options
author | Thomas White <taw@physics.org> | 2013-02-22 18:12:58 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2013-02-22 18:12:58 +0100 |
commit | 14dbe0b17405956fd1905044da74c78f09af81b2 (patch) | |
tree | 837a6701a81c95824f8f0c8563e802268d84d4f2 /src | |
parent | 2c439230bad3907f5fc93b3e69ade0d5a5acc4b4 (diff) |
Avoid fclose(NULL)
Diffstat (limited to 'src')
-rw-r--r-- | src/im-sandbox.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/im-sandbox.c b/src/im-sandbox.c index 787e43f9..be96d516 100644 --- a/src/im-sandbox.c +++ b/src/im-sandbox.c @@ -543,7 +543,9 @@ static void start_worker_process(struct sandbox *sb, int slot, } for ( j=0; j<sb->n_proc; j++ ) { if ( (j != slot) && (sb->running[j]) ) { - fclose(sb->result_fhs[j]); + if ( sb->result_fhs[j] != NULL ) { + fclose(sb->result_fhs[j]); + } close(sb->filename_pipes[j]); } } |