From patchwork Mon Dec 17 16:55:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 1888051 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1EBE43FCA5 for ; Mon, 17 Dec 2012 16:55:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752921Ab2LQQz0 (ORCPT ); Mon, 17 Dec 2012 11:55:26 -0500 Received: from mail-vc0-f174.google.com ([209.85.220.174]:61953 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752590Ab2LQQz0 (ORCPT ); Mon, 17 Dec 2012 11:55:26 -0500 Received: by mail-vc0-f174.google.com with SMTP id d16so7427150vcd.19 for ; Mon, 17 Dec 2012 08:55:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=beGYIa6vwgFk/1tn5hxvjfVK5d3K0glWWcw7Ti9I86Y=; b=aXTWXcuHdqkYsP4iv6tXSR4yzO3tTOJMX+Q8p2LxBQs5MgxmefvtDiTIWHGWk/yj9R fB/6QNPHSRnxc8SH63sr1wlDOx/JnjYVovaBJ/iRGz7syBwmhdAjyQx6Vto4BLk3XeOi pG1KuIuIH5ZUdMr/gvV6pJUaPJXFWJAH5WgV8Z2ufDB5dv5QXCJJkHgImnZfWVmDMSnr DE5rjPIugsk/86HiT5xucJUm6jIEFty2WKplWlfUFJBtriIJLJ22pXfrLuzKeD4f5ON7 fyAkZOcGy2okdesrTlDQypJv7sd3LRT3yxsysInyYdkLPPCk/vglddpatVr/jDeIgMef 8s3g== Received: by 10.220.231.65 with SMTP id jp1mr23761531vcb.30.1355763324997; Mon, 17 Dec 2012 08:55:24 -0800 (PST) Received: from [192.168.1.102] (c-71-192-10-85.hsd1.ma.comcast.net. [71.192.10.85]) by mx.google.com with ESMTPS id yf5sm11615396veb.13.2012.12.17.08.55.22 (version=SSLv3 cipher=OTHER); Mon, 17 Dec 2012 08:55:23 -0800 (PST) Message-ID: <50CF4E79.30709@dev.mellanox.co.il> Date: Mon, 17 Dec 2012 11:55:21 -0500 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Alex Netes CC: "linux-rdma (linux-rdma@vger.kernel.org)" , Jim Schutt Subject: [PATCH] opensm/osm_torus.c: Fix memory leak X-Gm-Message-State: ALoCoQlB9UQqMFQrch2CJo+789vSvI5cDL8AGDMdUdvya5OKnHKbDyLUHR1EE6pT3qv+yYgikVyY Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Hal Rosenstock Signed-off-by: Jim Schutt --- -- 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 --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;