diff --git a/ompi/mca/osc/ucx/osc_ucx_component.c b/ompi/mca/osc/ucx/osc_ucx_component.c index 2ac438678cf3e8ecd80d0900b0f7ce38d4727a6b..b5ce0ee251a5fd3f31fe6180f1fc832250b1900a 100644 --- a/ompi/mca/osc/ucx/osc_ucx_component.c +++ b/ompi/mca/osc/ucx/osc_ucx_component.c @@ -239,12 +239,12 @@ static int component_finalize(void) { } assert(mca_osc_ucx_component.num_incomplete_req_ops == 0); + if (NULL != mca_osc_ucx_component.ucp_context) { + ucp_cleanup(mca_osc_ucx_component.ucp_context); + mca_osc_ucx_component.ucp_context = NULL; + } if (mca_osc_ucx_component.env_initialized == true) { OBJ_DESTRUCT(&mca_osc_ucx_component.requests); - if (NULL != mca_osc_ucx_component.ucp_context) { - ucp_cleanup(mca_osc_ucx_component.ucp_context); - mca_osc_ucx_component.ucp_context = NULL; - } mca_osc_ucx_component.env_initialized = false; } diff --git a/orte/mca/plm/donau/plm_donau_module.c b/orte/mca/plm/donau/plm_donau_module.c index 8ca5e7af7d31c95dbf36a21a24cc24faf3db1126..ec9ce79f3713963aa37489785717872a25dee4e6 100644 --- a/orte/mca/plm/donau/plm_donau_module.c +++ b/orte/mca/plm/donau/plm_donau_module.c @@ -770,6 +770,9 @@ static simp_state donau_nodelist_simp(char *node_list, char *nodelist_result) { } strcpy(node[temp_num].name, temp_s); temp_num++; + if (temp_num >= DONAU_MAX_NODELIST_LENGTH) { + return SIMP_OUT_OF_RESOURCE; + } } for (int i = 0; i < temp_num; i++) { node[i].len = strlen(node[i].name); @@ -801,6 +804,9 @@ static simp_state donau_nodelist_simp(char *node_list, char *nodelist_result) { } strcat(nodelist_result, temp_str); if (i < temp_num || i == temp_num && stack_size > 1) { + if(strlen(nodelist_result) + 1 >= DONAU_MAX_NODELIST_LENGTH) { + return SIMP_OUT_OF_RESOURCE; + } strcat(nodelist_result, ","); } stack_size--; @@ -849,6 +855,9 @@ static simp_state donau_nodelist_simp(char *node_list, char *nodelist_result) { } strcat(nodelist_result, temp_str); if (i < temp_num) { + if(strlen(nodelist_result) + 1 >= DONAU_MAX_NODELIST_LENGTH) { + return SIMP_OUT_OF_RESOURCE; + } strcat(nodelist_result, ","); } } diff --git a/orte/mca/schizo/alps/schizo_alps.c b/orte/mca/schizo/alps/schizo_alps.c index 4c7db470921fb876ef87fe3e1a324de1bf929536..3367342eabc9f68669eefa16575bb7fc43bb3160 100644 --- a/orte/mca/schizo/alps/schizo_alps.c +++ b/orte/mca/schizo/alps/schizo_alps.c @@ -98,6 +98,7 @@ static orte_schizo_launch_environ_t check_launch_environment(void) running on a mom node, for example) */ opal_argv_append_nosize(&pushed_envs, OPAL_MCA_PREFIX"pmix"); opal_argv_append_nosize(&pushed_vals, "cray"); + fclose(fd_task_is_app); } fclose(fd); }