X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e10bd21dc31e83417de6984b8790e7a147aaa7b5..4c5b0cb8d6a49c0a868925de9678257a3cd0f041:/src/smpi/colls/coll_tuned_topo.cpp diff --git a/src/smpi/colls/coll_tuned_topo.cpp b/src/smpi/colls/coll_tuned_topo.cpp index f43cbc5a35..0236803ca9 100644 --- a/src/smpi/colls/coll_tuned_topo.cpp +++ b/src/smpi/colls/coll_tuned_topo.cpp @@ -380,6 +380,7 @@ ompi_coll_tuned_topo_build_bmtree( MPI_Comm comm, if( remote >= size ) remote -= size; if (childs==MAXTREEFANOUT) { XBT_DEBUG("coll:tuned:topo:build_bmtree max fanout incorrect %d needed %d", MAXTREEFANOUT, childs); + delete bmtree; return NULL; } bmtree->tree_next[childs] = remote; @@ -427,6 +428,7 @@ ompi_coll_tree_t* ompi_coll_tuned_topo_build_in_order_bmtree(MPI_Comm comm, int bmtree = new ompi_coll_tree_t; if (not bmtree) { XBT_DEBUG("coll:tuned:topo:build_bmtree PANIC out of memory"); + delete bmtree; return NULL; } @@ -451,6 +453,7 @@ ompi_coll_tree_t* ompi_coll_tuned_topo_build_in_order_bmtree(MPI_Comm comm, int childs++; if (childs == MAXTREEFANOUT) { XBT_DEBUG("coll:tuned:topo:build_bmtree max fanout incorrect %d needed %d", MAXTREEFANOUT, childs); + delete bmtree; return NULL; } }