[PATCH] D58622: [libFuzzer] fix missing close on opened file

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 26 11:35:18 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL354918: [libFuzzer] fix missing close on opened file (authored by vitalybuka, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D58622?vs=188190&id=188429#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58622/new/

https://reviews.llvm.org/D58622

Files:
  compiler-rt/trunk/lib/fuzzer/standalone/StandaloneFuzzTargetMain.c


Index: compiler-rt/trunk/lib/fuzzer/standalone/StandaloneFuzzTargetMain.c
===================================================================
--- compiler-rt/trunk/lib/fuzzer/standalone/StandaloneFuzzTargetMain.c
+++ compiler-rt/trunk/lib/fuzzer/standalone/StandaloneFuzzTargetMain.c
@@ -32,6 +32,7 @@
     fseek(f, 0, SEEK_SET);
     unsigned char *buf = (unsigned char*)malloc(len);
     size_t n_read = fread(buf, 1, len, f);
+    fclose(f);
     assert(n_read == len);
     LLVMFuzzerTestOneInput(buf, len);
     free(buf);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58622.188429.patch
Type: text/x-patch
Size: 528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190226/7b52d08b/attachment.bin>


More information about the llvm-commits mailing list