[PATCH] D58622: [libFuzzer] fix missing close on opened file
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 25 07:31:35 PST 2019
lebedev.ri added inline comments.
================
Comment at: lib/fuzzer/standalone/StandaloneFuzzTargetMain.c:34
unsigned char *buf = (unsigned char*)malloc(len);
size_t n_read = fread(buf, 1, len, f);
assert(n_read == len);
----------------
You probably can even close it right after `fread`?
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58622/new/
https://reviews.llvm.org/D58622
More information about the llvm-commits
mailing list