1
1

Fix dereference of NULL variable (Coverty 473).

This commit was SVN r19201.
Этот коммит содержится в:
George Bosilca 2008-08-06 15:46:09 +00:00
родитель 5eb4ebe8fa
Коммит fb02c23389

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

@ -102,12 +102,14 @@ ompi_group_t *ompi_group_allocate_sporadic(int group_size)
/* create new group group element */ /* create new group group element */
new_group = OBJ_NEW(ompi_group_t); new_group = OBJ_NEW(ompi_group_t);
if (new_group) { if( NULL == new_group) {
goto error_exit;
}
if (OMPI_ERROR == new_group->grp_f_to_c_index) { if (OMPI_ERROR == new_group->grp_f_to_c_index) {
OBJ_RELEASE(new_group); OBJ_RELEASE(new_group);
new_group = NULL; new_group = NULL;
goto error_exit; goto error_exit;
} else { }
/* allocate array of (grp_sporadic_list )'s */ /* allocate array of (grp_sporadic_list )'s */
if (0 < group_size) { if (0 < group_size) {
new_group->sparse_data.grp_sporadic.grp_sporadic_list = new_group->sparse_data.grp_sporadic.grp_sporadic_list =
@ -129,13 +131,10 @@ ompi_group_t *ompi_group_allocate_sporadic(int group_size)
/* initialize our rank to MPI_UNDEFINED */ /* initialize our rank to MPI_UNDEFINED */
new_group->grp_my_rank = MPI_UNDEFINED; new_group->grp_my_rank = MPI_UNDEFINED;
}
}
new_group->grp_proc_pointers = NULL; new_group->grp_proc_pointers = NULL;
OMPI_GROUP_SET_SPORADIC(new_group); OMPI_GROUP_SET_SPORADIC(new_group);
error_exit: error_exit:
/* return */
return new_group; return new_group;
} }
ompi_group_t *ompi_group_allocate_strided(void) { ompi_group_t *ompi_group_allocate_strided(void) {