From 8febd41a394201f9e68e98c20404e6e460f0eb2a Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 12 Feb 2015 12:34:51 -0800 Subject: [PATCH] usnic: fix minor memory leak This was CID 1269859. --- opal/mca/btl/usnic/btl_usnic_proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opal/mca/btl/usnic/btl_usnic_proc.c b/opal/mca/btl/usnic/btl_usnic_proc.c index a012008715..801ad22570 100644 --- a/opal/mca/btl/usnic/btl_usnic_proc.c +++ b/opal/mca/btl/usnic/btl_usnic_proc.c @@ -546,8 +546,6 @@ static int match_modex(opal_btl_usnic_module_t *module, size_t i; uint32_t num_modules; opal_btl_usnic_graph_t *g = NULL; - int nme; - int *me; bool proc_is_left; if (NULL == index_out) { @@ -597,7 +595,8 @@ static int match_modex(opal_btl_usnic_module_t *module, goto out_free_table; } - nme = 0; + int nme = 0; + int *me = NULL; err = opal_btl_usnic_solve_bipartite_assignment(g, &nme, &me); if (OPAL_SUCCESS != err) { OPAL_ERROR_LOG(err); @@ -605,6 +604,7 @@ static int match_modex(opal_btl_usnic_module_t *module, } edge_pairs_to_match_table(proc, proc_is_left, nme, me); + free(me); err = opal_btl_usnic_gr_free(g); if (OPAL_SUCCESS != err) {