1
1

fix some more minor memory leaks

This commit was SVN r14260.
Этот коммит содержится в:
Tim Prins 2007-04-07 18:41:16 +00:00
родитель e09a154266
Коммит df4c468bb4
9 изменённых файлов: 61 добавлений и 15 удалений

Просмотреть файл

@ -142,14 +142,6 @@ int orte_ras_base_open(void)
orte_ras_base.timing = false;
}
/* Open up all available components */
if (ORTE_SUCCESS !=
mca_base_components_open("ras", orte_ras_base.ras_output,
mca_ras_base_static_components,
&orte_ras_base.ras_opened, true)) {
return ORTE_ERROR;
}
/* if we are not on a HNP, select the proxy 'module' */
if (!orte_process_info.seed) {
orte_ras = orte_ras_base_proxy_module;
@ -159,6 +151,14 @@ int orte_ras_base_open(void)
return ORTE_SUCCESS;
}
/* Open up all available components */
if (ORTE_SUCCESS !=
mca_base_components_open("ras", orte_ras_base.ras_output,
mca_ras_base_static_components,
&orte_ras_base.ras_opened, true)) {
return ORTE_ERROR;
}
/* All done */
orte_ras_base.ras_opened_valid = true;

Просмотреть файл

@ -214,6 +214,7 @@ int orte_rmgr_base_set_proc_info(const orte_process_name_t* name, pid_t pid, cha
}
OBJ_RELEASE(values[0]);
free(segment);
return rc;
}

Просмотреть файл

@ -82,8 +82,16 @@ orte_sds_bproc_component_init(int *priority)
id = mca_base_param_register_string("ns", "nds", NULL, NULL, NULL);
mca_base_param_lookup_string(id, &mode);
if (NULL == mode || 0 != strcmp("bproc", mode)) { return NULL; }
if (NULL == mode || 0 != strcmp("bproc", mode)) {
if(NULL != mode) {
free(mode);
}
return NULL;
}
if(NULL != mode) {
free(mode);
}
*priority = 20;
return &orte_sds_bproc_module;
}

Просмотреть файл

@ -84,7 +84,10 @@ orte_sds_cnos_component_init(int *priority)
/* if mode isn't NULL, then we have an ORTE starter. Don't use
this component */
if (NULL != mode) return NULL;
if (NULL != mode) {
free(mode);
return NULL;
}
*priority = 60;
return &orte_sds_cnos_module;

11
orte/mca/sds/env/sds_env_component.c поставляемый
Просмотреть файл

@ -80,7 +80,16 @@ orte_sds_env_component_init(int *priority)
id = mca_base_param_register_string("ns", "nds", NULL, NULL, NULL);
mca_base_param_lookup_string(id, &mode);
if (NULL == mode || 0 != strcmp("env", mode)) { return NULL; }
if (NULL == mode || 0 != strcmp("env", mode)) {
if(NULL != mode) {
free(mode);
}
return NULL;
}
if(NULL != mode) {
free(mode);
}
*priority = 20;
return &orte_sds_env_module;

Просмотреть файл

@ -82,8 +82,16 @@ orte_sds_pipe_component_init(int *priority)
id = mca_base_param_register_string("ns", "nds", NULL, NULL, NULL);
mca_base_param_lookup_string(id, &mode);
if (NULL == mode || 0 != strcmp("pipe", mode)) { return NULL; }
if (NULL == mode || 0 != strcmp("pipe", mode)) {
if(NULL != mode) {
free(mode);
}
return NULL;
}
if(NULL != mode) {
free(mode);
}
*priority = 20;
return &orte_sds_pipe_module;
}

Просмотреть файл

@ -83,7 +83,10 @@ orte_sds_portals_utcp_component_init(int *priority)
/* if mode isn't NULL, then we have an ORTE starter. Don't use
this component */
if (NULL != mode) return NULL;
if (NULL != mode) {
free(mode);
return NULL;
}
if (NULL == getenv("PTL_MY_RID")) return NULL;
*priority = 60;

Просмотреть файл

@ -86,9 +86,15 @@ orte_sds_slurm_component_init(int *priority)
mca_base_param_lookup_string(id, &mode);
if (NULL == mode || 0 != strcmp("slurm", mode)) {
if(NULL != mode) {
free(mode);
}
return NULL;
}
if(NULL != mode) {
free(mode);
}
*priority = 20;
return &orte_sds_slurm_module;
}

Просмотреть файл

@ -82,8 +82,16 @@ orte_sds_xcpu_component_init(int *priority)
id = mca_base_param_register_string("ns", "nds", NULL, NULL, NULL);
mca_base_param_lookup_string(id, &mode);
if (NULL == mode || 0 != strcmp("xcpu", mode)) { return NULL; }
if (NULL == mode || 0 != strcmp("xcpu", mode)) {
if(NULL != mode) {
free(mode);
}
return NULL;
}
if(NULL != mode) {
free(mode);
}
*priority = 30;
return &orte_sds_xcpu_module;
}