From patchwork Wed May 29 17:26:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 2632001 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 105C9DF24C for ; Wed, 29 May 2013 17:27:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932708Ab3E2R07 (ORCPT ); Wed, 29 May 2013 13:26:59 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:33167 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932471Ab3E2R06 (ORCPT ); Wed, 29 May 2013 13:26:58 -0400 Received: by mail-wi0-f176.google.com with SMTP id hr14so3771084wib.15 for ; Wed, 29 May 2013 10:26:56 -0700 (PDT) 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=4/kUuahKjqbRqwBaE4of4aifgc8gT+mnZrh5MA/QU+w=; b=UiU3jVfC+wqAmXD5eP8e9WhCTs2paaXe0M+4W1yCLoWAKkzZyglWC1y43iLcZGBvrr V3Kix2VlsTLP2BG+rMgng2nHTQ3XEjbSlk9r08d3J7Eh54jxh8pMWKRqsJ773vDkQEMq RJL4DQdMlPOdRfv9WTYsXHj8HkDEvUnccrbTgGJ9spqcErVN8JY9eQChRzZ/iR4bWMEb kxw0CVIoTWQYjcNbrhrXME+K/UCrhkIPSnrM+HX/ysn/2we+Sij8AdH6QjFgtn8x3/sA o/4311DjyGX2SGaKt+2IqA70/TQiUGINMhOeuwAI21rSuVlOjoYL+sIwNOPihdXgI05V LVJw== X-Received: by 10.180.205.206 with SMTP id li14mr16266092wic.33.1369848416478; Wed, 29 May 2013 10:26:56 -0700 (PDT) Received: from [192.168.1.102] (c-71-234-225-85.hsd1.ct.comcast.net. [71.234.225.85]) by mx.google.com with ESMTPSA id q13sm32583008wie.8.2013.05.29.10.26.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 May 2013 10:26:55 -0700 (PDT) Message-ID: <51A63A5E.1070900@dev.mellanox.co.il> Date: Wed, 29 May 2013 13:26:54 -0400 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: "linux-rdma (linux-rdma@vger.kernel.org)" CC: Jens Domke , Dan Ben-Yosef Subject: [PATCH] osm_ucast_dfsssp.c: Fix memory leak in dfsssp_do_dijkstra_routing X-Gm-Message-State: ALoCoQkiUqeI9e51fA+dg665DtSaRNZY2FC2Dwbjid21/B0atIBN3Fy9rs9Rnla50EYy7r21Bg+s Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From 5c06cdf5029ca79a8c2e684a23b1b7e89a93c3a6 Mon Sep 17 00:00:00 2001 From: Dan Ben Yosef Date: Wed, 29 May 2013 15:41:41 +0300 Subject: [PATCH] osm_ucast_dfsssp.c: Fix memory leak in dfsssp_do_dijkstra_routing Variable "sw_list" going out of scope leaks the storage it points to. Signed-off-by: Dan Ben Yosef --- opensm/osm_ucast_dfsssp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/opensm/osm_ucast_dfsssp.c b/opensm/osm_ucast_dfsssp.c index 95e1627..3972656 100644 --- a/opensm/osm_ucast_dfsssp.c +++ b/opensm/osm_ucast_dfsssp.c @@ -2181,6 +2181,7 @@ static int dfsssp_do_dijkstra_routing(void *context) } else { OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR AD31: corrupted sw_list array in dfsssp_do_dijkstra_routing\n"); + free(sw_list); return 1; } }