File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -763,6 +763,7 @@ enum {
763
763
*/
764
764
#define MPI_T_PVAR_ALL_HANDLES ((MPI_T_pvar_handle) -1)
765
765
#define MPI_T_PVAR_HANDLE_NULL ((MPI_T_pvar_handle) 0)
766
+ #define MPI_T_PVAR_SESSION_NULL ((MPI_T_pvar_session) 0)
766
767
#define MPI_T_CVAR_HANDLE_NULL ((MPI_T_cvar_handle) 0)
767
768
768
769
/* MPI-2 specifies that the name "MPI_TYPE_NULL_DELETE_FN" (and all
Original file line number Diff line number Diff line change 23
23
24
24
int MPI_T_pvar_session_free (MPI_T_pvar_session * session )
25
25
{
26
+ int ret = MPI_SUCCESS ;
27
+
26
28
if (!mpit_is_initialized ()) {
27
29
return MPI_T_ERR_NOT_INITIALIZED ;
28
30
}
29
31
30
- if (NULL != * session ) {
32
+ /* Check that this is a valid session */
33
+ if (MPI_T_PVAR_SESSION_NULL == * session ) {
34
+ ret = MPI_T_ERR_INVALID_SESSION ;
35
+ } else {
31
36
OBJ_RELEASE (* session );
32
- * session = NULL ;
37
+ * session = MPI_T_PVAR_SESSION_NULL ;
33
38
}
34
39
35
- return MPI_SUCCESS ;
40
+ return ret ;
36
41
}
You can’t perform that action at this time.
0 commit comments