Skip to content

Commit 4181df6

Browse files
committed
Move an fclose() to after cleaup_results which avoids left open file pointers.
1 parent be2a6bc commit 4181df6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CometSearch/CometSearchManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3664,9 +3664,9 @@ bool CometSearchManager::DoSingleSpectrumSearchMultiResults(const int topN,
36643664
scores.push_back(score);
36653665
}
36663666

3667-
fclose(fpdb); //FIX: would be nice to not fopen/fclose with each query
3667+
cleanup_results:
36683668

3669-
cleanup_results:
3669+
fclose(fpdb); //FIX: would be nice to not fopen/fclose with each query
36703670

36713671
// Deleting each Query object in the vector calls its destructor, which
36723672
// frees the spectral memory (see definition for Query in CometDataInternal.h).

0 commit comments

Comments
 (0)