files opened with fdopen should be closed with fclose
MODIFY
src/afl-forkserver.c
src/afl-forkserver.c
@@ -253,7 +253,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv) {
#ifndef HAVE_ARC4RANDOM
close(fsrv->dev_urandom_fd);
#endif
- close(fsrv->plot_file == NULL ? -1 : fileno(fsrv->plot_file));
+ if (fsrv->plot_file != NULL) fclose(fsrv->plot_file);
/* This should improve performance a bit, since it stops the linker from
doing extra work post-fork(). */

MODIFY
src/afl-fuzz-cmplog.c
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(). */

files opened with fdopen should be closed with fclose