about summary refs log tree commit diff
path: root/src/afl-fuzz-cmplog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/afl-fuzz-cmplog.c')
-rw-r--r--src/afl-fuzz-cmplog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/afl-fuzz-cmplog.c b/src/afl-fuzz-cmplog.c
index f932f33b..98f7db05 100644
--- a/src/afl-fuzz-cmplog.c
+++ b/src/afl-fuzz-cmplog.c
@@ -121,7 +121,7 @@ void init_cmplog_forkserver(afl_state_t *afl) {
 #ifndef HAVE_ARC4RANDOM
     close(afl->fsrv.dev_urandom_fd);
 #endif
-    close(afl->fsrv.plot_file == NULL ? -1 : fileno(afl->fsrv.plot_file));
+    if (afl->fsrv.plot_file != NULL) fclose(afl->fsrv.plot_file);
 
     /* This should improve performance a bit, since it stops the linker from
        doing extra work post-fork(). */