From 07689f767246c9e3c7eb70474ae7b60656b0e038 Mon Sep 17 00:00:00 2001 From: Greg Eisenhauer Date: Sun, 23 May 2021 21:08:37 -0400 Subject: [PATCH] TSAN --- source/adios2/toolkit/sst/cp/cp_reader.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/adios2/toolkit/sst/cp/cp_reader.c b/source/adios2/toolkit/sst/cp/cp_reader.c index 277c6fa240..9e2cd57436 100644 --- a/source/adios2/toolkit/sst/cp/cp_reader.c +++ b/source/adios2/toolkit/sst/cp/cp_reader.c @@ -2257,6 +2257,7 @@ extern void SstReaderClose(SstStream Stream) free(Stream->CurrentMetadata); Stream->CurrentMetadata = NULL; } + STREAM_MUTEX_LOCK(Stream); for (int i = 0; i < Stream->InternalMetaMetaCount; i++) { free(Stream->InternalMetaMetaInfo[i].ID); @@ -2271,6 +2272,7 @@ extern void SstReaderClose(SstStream Stream) } free(Stream->InternalAttrDataInfo); } + STREAM_MUTEX_UNLOCK(Stream); } // SstWaitForCompletion is only called by the main program thread and