From patchwork Mon Feb 24 15:05:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3709701 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 51F0C9F2ED for ; Mon, 24 Feb 2014 15:05:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 89FF020149 for ; Mon, 24 Feb 2014 15:05:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3947620107 for ; Mon, 24 Feb 2014 15:05:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752585AbaBXPFt (ORCPT ); Mon, 24 Feb 2014 10:05:49 -0500 Received: from mail-wi0-f174.google.com ([209.85.212.174]:60679 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752313AbaBXPFt (ORCPT ); Mon, 24 Feb 2014 10:05:49 -0500 Received: by mail-wi0-f174.google.com with SMTP id f8so3181389wiw.7 for ; Mon, 24 Feb 2014 07:05:48 -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=tlEGOakDgGLZDslp2iFBJnbDOSufyoFPkJ5oKED0igs=; b=W6AAIj3j1jfx7X6uRxW0NY7kdLSW3Sa4Cm/f+lFZDWwl8RifR2pz+H+ySt2uRhWtRk 1q8Wwb6BdLU80gBByvigM+TA2WJjatzFVlL9yUOUr1S0sqTNIGNvl0qujZmJS59RSZW1 rqq2iGnUK6Lfcb/xBLC/jgQ/LCb7gJoG8Qct4L9m0RlLx3ov1vvUsulStqOwNGzPC8Wa /6ADssI++78w0YfjanzVl1RN7z9RGQA1QWViNCzRU1bl3daK+1DZefJvdh26Lgd2ibke h/JAT5vzYL0IGAyCOGetLD7/umZcQWLk+p6rqYPEd3G/eVl7j/xk9o11fkSUU8dZdh5x oDNQ== X-Gm-Message-State: ALoCoQlqxjfUbOTjQY98ZZxJ8XthVxxNbfjP/+y3W5Wh1RIABYvfF7Ra9JCump7ti3VhTK55Gvs+ X-Received: by 10.180.79.7 with SMTP id f7mr14909160wix.20.1393254347969; Mon, 24 Feb 2014 07:05:47 -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 ff7sm25022210wic.10.2014.02.24.07.05.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Feb 2014 07:05:47 -0800 (PST) Message-ID: <530B5FC8.5060403@dev.mellanox.co.il> Date: Mon, 24 Feb 2014 10:05:44 -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 guid2mkey parser (guid validation 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 guid validation ("subn_validate_g2m") 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 db8c2a0..77e486a 100644 --- a/opensm/osm_subnet.c +++ b/opensm/osm_subnet.c @@ -966,6 +966,7 @@ static void subn_validate_g2m(osm_subn_t *p_subn) "guid:0x%016" PRIx64 "\n", p_item->guid); } + free(p_item); } Exit: