All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/10] DFSSSP: fix a memory leak in dfsssp_build_graph
@ 2013-01-22 16:38 Jens Domke
  2013-02-03 17:51 ` Alex Netes
  0 siblings, 1 reply; 2+ messages in thread
From: Jens Domke @ 2013-01-22 16:38 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Alex Netes, Torsten Hoefler, Jens Domke

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 <domke.j.aa@m.titech.ac.jp>
---
 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 01/10] DFSSSP: fix a memory leak in dfsssp_build_graph
  2013-01-22 16:38 [PATCH 01/10] DFSSSP: fix a memory leak in dfsssp_build_graph Jens Domke
@ 2013-02-03 17:51 ` Alex Netes
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Netes @ 2013-02-03 17:51 UTC (permalink / raw)
  To: Jens Domke; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Torsten Hoefler

Hi Jens,

On 01:38 Wed 23 Jan     , Jens Domke wrote:
> 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 <domke.j.aa@m.titech.ac.jp>
> ---

Applied the series, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-03 17:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-22 16:38 [PATCH 01/10] DFSSSP: fix a memory leak in dfsssp_build_graph Jens Domke
2013-02-03 17:51 ` Alex Netes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.