From 14dbe0b17405956fd1905044da74c78f09af81b2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 22 Feb 2013 18:12:58 +0100 Subject: Avoid fclose(NULL) --- src/im-sandbox.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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; jn_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]); } } -- cgit v1.2.3