From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hal Rosenstock Subject: [PATCH] opensm/osm_torus.c: Fix memory leak Date: Mon, 17 Dec 2012 11:55:21 -0500 Message-ID: <50CF4E79.30709@dev.mellanox.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Alex Netes Cc: "linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)" , Jim Schutt List-Id: linux-rdma@vger.kernel.org Signed-off-by: Hal Rosenstock Signed-off-by: Jim Schutt --- 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; -- 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