We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc034ba commit 0a255fcCopy full SHA for 0a255fc
compiler-rt/lib/profile/InstrProfilingFile.c
@@ -677,6 +677,7 @@ static void initializeProfileForContinuousMode(void) {
677
PROF_ERR("Continuous counter sync mode is enabled, but raw profile is not"
678
"page-aligned. CurrentFileOffset = %" PRIu64 ", pagesz = %u.\n",
679
(uint64_t)CurrentFileOffset, PageSize);
680
+ fclose(File);
681
return;
682
}
683
if (writeProfileWithFileObject(Filename, File) != 0) {
@@ -692,6 +693,8 @@ static void initializeProfileForContinuousMode(void) {
692
693
694
if (doMerging()) {
695
lprofUnlockFileHandle(File);
696
+ }
697
+ if (File != NULL) {
698
fclose(File);
699
700
0 commit comments