Skip to content

Commit 74595fe

Browse files
committed
Fix accessing uninitalized object.
1 parent c22c945 commit 74595fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/runtime-libraries/mpi/mpi_caf.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,9 +1116,13 @@ finalize_internal(int status_code)
11161116
}
11171117
#endif
11181118

1119+
#ifdef HELPER
11191120
pthread_mutex_lock(&lock_am);
11201121
caf_is_finalized = 1;
11211122
pthread_mutex_unlock(&lock_am);
1123+
#else
1124+
caf_is_finalized = 1;
1125+
#endif
11221126
free(sync_handles);
11231127
dprint("Finalisation done!!!\n");
11241128
}

0 commit comments

Comments
 (0)