mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 02:28:09 +00:00
files opened with fdopen should be closed with fclose
This commit is contained in:
@ -253,7 +253,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv) {
|
|||||||
#ifndef HAVE_ARC4RANDOM
|
#ifndef HAVE_ARC4RANDOM
|
||||||
close(fsrv->dev_urandom_fd);
|
close(fsrv->dev_urandom_fd);
|
||||||
#endif
|
#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
|
/* This should improve performance a bit, since it stops the linker from
|
||||||
doing extra work post-fork(). */
|
doing extra work post-fork(). */
|
||||||
|
@ -121,7 +121,7 @@ void init_cmplog_forkserver(afl_state_t *afl) {
|
|||||||
#ifndef HAVE_ARC4RANDOM
|
#ifndef HAVE_ARC4RANDOM
|
||||||
close(afl->fsrv.dev_urandom_fd);
|
close(afl->fsrv.dev_urandom_fd);
|
||||||
#endif
|
#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
|
/* This should improve performance a bit, since it stops the linker from
|
||||||
doing extra work post-fork(). */
|
doing extra work post-fork(). */
|
||||||
|
Reference in New Issue
Block a user