From patchwork Mon Feb 24 15:05:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3709711 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7421EBF13A for ; Mon, 24 Feb 2014 15:05:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 983A620149 for ; Mon, 24 Feb 2014 15:05:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A515E20107 for ; Mon, 24 Feb 2014 15:05:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752701AbaBXPFx (ORCPT ); Mon, 24 Feb 2014 10:05:53 -0500 Received: from mail-wg0-f45.google.com ([74.125.82.45]:38197 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752313AbaBXPFw (ORCPT ); Mon, 24 Feb 2014 10:05:52 -0500 Received: by mail-wg0-f45.google.com with SMTP id l18so4695567wgh.0 for ; Mon, 24 Feb 2014 07:05:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=AZnO3sdrTVuTD2W5EYAivcr92nOQmWfScCC/k8e04ws=; b=TzAbJmMo2FIWlGZ9dYz9bDr9BjYiIFp+b7CbqqfPFIA2NakrBVvlgOQ3jvbm1dQSCW NRagJXtFX3sg173673zMaaIV2zudmdbfVa7abxRHpMaamBc+huvn26Pw3Zy+YLCLnF0J idaxGjWa9h4vMYV6j5Qxe1+3V5QRqNgpmgUSGl0S3LBuCEFJ436+v8WWz/7BD4pWfy0C 2Zb8rGw8Mh4tzJY/mlgpAUWH8ZAIWoZMBQVXAJJKb0sgOaMLu4tGGV5nypCvtI15Ydnk x4S0dKBKdSemDufI2NiuNBI7TIvyvGwtRwxAchwUp2Yz8zEs3LykQg9B6tK/+TnvMjlK zsvQ== X-Gm-Message-State: ALoCoQnvlqMUMlL+1lX90R5VfNuWFDMxdjbThzNAWN53nrDmDq/N/9IHKrWYJylImgKJF+r6yNsj X-Received: by 10.194.77.7 with SMTP id o7mr19388639wjw.35.1393254351367; Mon, 24 Feb 2014 07:05:51 -0800 (PST) Received: from [192.168.1.102] (c-98-229-118-119.hsd1.ma.comcast.net. [98.229.118.119]) by mx.google.com with ESMTPSA id 12sm42812873wjm.10.2014.02.24.07.05.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Feb 2014 07:05:51 -0800 (PST) Message-ID: <530B5FCD.3000700@dev.mellanox.co.il> Date: Mon, 24 Feb 2014 10:05:49 -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: "linux-rdma (linux-rdma@vger.kernel.org)" CC: Dan Ben-Yosef , Vladimir Koushnir Subject: [PATCH opensm] osm_subnet.c: Fix resource leak neighbor parser ("subn_validate_neighbor" function) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dan Ben Yosef Fix resource leak after neighbor validation Signed-off-by: Dan Ben Yosef Reviewed-by: Vladimir Koushnir --- opensm/osm_subnet.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/opensm/osm_subnet.c b/opensm/osm_subnet.c index 77e486a..e9024ac 100644 --- a/opensm/osm_subnet.c +++ b/opensm/osm_subnet.c @@ -1051,6 +1051,7 @@ static void subn_validate_neighbor(osm_subn_t *p_subn) "guid:0x%016" PRIx64 " port:%u\n", p_item->guid, p_item->portnum); } + free(p_item); } Exit: