1
1

correctly allocate cart in mca_topo_base_cart_sub(...)

since r31716 mca_topo_base_comm_cart_2_2_0_t is an object
and must be allocated/freed with OBJ_NEW/OBJ_RELEASE.

this fixes topology/cart_sub_zero from the ibm test suite.

v1.8 does not use objects, so no cmr for this branch

This commit was SVN r31883.

The following SVN revision numbers were found above:
  r31716 --> open-mpi/ompi@e3df77548d
Этот коммит содержится в:
Gilles Gouaillardet 2014-05-23 03:07:46 +00:00
родитель 041b72b0cc
Коммит 4843909a6b

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

@ -118,7 +118,7 @@ int mca_topo_base_cart_sub (ompi_communicator_t* comm,
}
}
}
cart = (mca_topo_base_comm_cart_2_2_0_t*)calloc(1, sizeof(mca_topo_base_comm_cart_2_2_0_t));
cart = OBJ_NEW(mca_topo_base_comm_cart_2_2_0_t);
if( NULL == cart ) {
ompi_comm_free(&temp_comm);
return OMPI_ERR_OUT_OF_RESOURCE;
@ -133,7 +133,7 @@ int mca_topo_base_cart_sub (ompi_communicator_t* comm,
if (NULL == cart->coords) {
free(cart->periods);
if(NULL != cart->dims) free(cart->dims);
free(cart);
OBJ_RELEASE(cart);
return OMPI_ERR_OUT_OF_RESOURCE;
}
{ /* setup the cartesian topology */