Skip to content

Commit

Permalink
free ParsecRuntime::madness_comm_thread_es even if MADWorld did not…
Browse files Browse the repository at this point in the history
… create the context
  • Loading branch information
evaleev committed Nov 2, 2023
1 parent 2716540 commit 41375b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/madness/world/parsec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,13 @@ namespace madness {
if (*made_new_ctx) {
parsec_context_wait(ctx);
parsec_fini(&ctx);
if (nullptr != madness_comm_thread_es) {
ctx = nullptr;
}
if (nullptr != madness_comm_thread_es) {
/* madness_comm_thread_es is just a copy of ES[0]. Resources (including es->profiling_es) are
* actually freed during parsec_fini. Just need to free memory allocated to store it. */
free(madness_comm_thread_es);
madness_comm_thread_es = nullptr;
}
ctx = nullptr;
}
}

Expand Down

0 comments on commit 41375b2

Please sign in to comment.