If the graph could not be build correctly and DFSSSP returns an error, then not all allocated memory was freed.
Signed-off-by: Jens Domke <[email protected]> --- opensm/osm_ucast_dfsssp.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opensm/osm_ucast_dfsssp.c b/opensm/osm_ucast_dfsssp.c index ffc317f..ff525ea 100644 --- a/opensm/osm_ucast_dfsssp.c +++ b/opensm/osm_ucast_dfsssp.c @@ -1093,6 +1093,9 @@ static int dfsssp_build_graph(void *context) for (i = 0; i < adj_list_size; i++) set_default_vertex(&adj_list[i]); + dfsssp_ctx->adj_list = adj_list; + dfsssp_ctx->adj_list_size = adj_list_size; + /* count the total number of Hca / LIDs (for lmc>0) in the fabric */ for (item = cl_qmap_head(port_tbl); item != cl_qmap_end(port_tbl); item = cl_qmap_next(item)) { @@ -1190,9 +1193,6 @@ static int dfsssp_build_graph(void *context) if (OSM_LOG_IS_ACTIVE_V2(p_mgr->p_log, OSM_LOG_DEBUG)) dfsssp_print_graph(p_mgr, adj_list, adj_list_size); - dfsssp_ctx->adj_list = adj_list; - dfsssp_ctx->adj_list_size = adj_list_size; - OSM_LOG_EXIT(p_mgr->p_log); return 0; } -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
