Issue 79708
Summary compiler-rt/lib/profile/InstrProfilingFile.c:680:7: error: Resource leak
Labels new issue
Assignees
Reporter dcb314
    Source code is

    if (CurrentFileOffset % PageSize != 0) {
      PROF_ERR("Continuous counter sync mode is enabled, but raw profile is not"
               "page-aligned. CurrentFileOffset = %" PRIu64 ", pagesz = %u.\n",
 (uint64_t)CurrentFileOffset, PageSize);
      return;
    }
    if (writeProfileWithFileObject(Filename, File) != 0) {
 fclose(File);
      return;
    }

If it's worth calling fclose in the second if, then it is worthwhile in the first.

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to