1
1

topo base: ensure topo is != NULL before acting on it

This was CID 1041229
Этот коммит содержится в:
Jeff Squyres 2015-02-24 10:17:19 -05:00
родитель f381c5ea8b
Коммит 3758e3a242

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

@ -92,15 +92,15 @@ int mca_topo_base_dist_graph_create_adjacent(mca_topo_base_module_t* module,
return OMPI_SUCCESS; return OMPI_SUCCESS;
bail_out: bail_out:
if( NULL != topo->in ) free(topo->in); if (NULL != topo) {
if( MPI_UNWEIGHTED != sourceweights ) { if( NULL != topo->in ) free(topo->in);
if( NULL != topo->inw ) free(topo->inw); if( MPI_UNWEIGHTED != sourceweights ) {
} if( NULL != topo->inw ) free(topo->inw);
if( NULL != topo->out ) free(topo->out); }
if( MPI_UNWEIGHTED != destweights ) { if( NULL != topo->out ) free(topo->out);
if( NULL != topo->outw ) free(topo->outw); if( MPI_UNWEIGHTED != destweights ) {
} if( NULL != topo->outw ) free(topo->outw);
if( NULL != topo ) { }
free(topo); free(topo);
} }
ompi_comm_free(newcomm); ompi_comm_free(newcomm);