diff mbox

opensm/osm_torus.c: Fix memory leak

Message ID 50CF4E79.30709@dev.mellanox.co.il (mailing list archive)
State Accepted
Delegated to: Alex Netes
Headers show

Commit Message

Hal Rosenstock Dec. 17, 2012, 4:55 p.m. UTC
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Jim Schutt <jaschut@sandia.gov>
---
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Alex Netes Jan. 30, 2013, 5:48 p.m. UTC | #1
Hi Hal,

On 11:55 Mon 17 Dec     , Hal Rosenstock wrote:
> 
> Signed-off-by: Hal Rosenstock <hal@mellanox.com>
> Signed-off-by: Jim Schutt <jaschut@sandia.gov>
> ---

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

Patch

diff --git a/opensm/osm_torus.c b/opensm/osm_torus.c
index 4b369a1..1d847b3 100644
--- a/opensm/osm_torus.c
+++ b/opensm/osm_torus.c
@@ -8779,7 +8779,7 @@  osm_mtree_node_t *mcast_stree_branch(struct t_switch *sw, osm_switch_t *osm_sw,
 		}
 	}
 	if (!(mcast_end_ports || mcast_fwd_ports)) {
-		free(mtn);
+		osm_mtree_destroy(mtn);
 		mtn = NULL;
 	} else if (depth > *max_depth)
 		*max_depth = depth;