From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM05-DM3-obe.outbound.protection.outlook.com (mail-eopbgr730052.outbound.protection.outlook.com [40.107.73.52]) by dpdk.org (Postfix) with ESMTP id 1BF41201; Sun, 4 Nov 2018 05:50:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TGkOLCxv0lHYIn2jBksfuWFafS3XbSHNKtIqmw7zs2U=; b=mOdNu7WeARPaSsG9XPGKF9/kcMjYlmkhtfUlga2XMn6o5XSPrGUDopcOcXyCmcinSK92G4jan680+cH+ZBSHMIyLZhFmesvVQQ+EJhsPl9C9gT6Dh97awWpSYsfP8f8IUz0uV0cgpAA1HG5NzkZ6Du7iHCamNXM4hYKcKphXyU8= Received: from SN1PR12MB2574.namprd12.prod.outlook.com (52.132.197.150) by SN1PR12MB0207.namprd12.prod.outlook.com (10.162.3.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.25; Sun, 4 Nov 2018 04:50:53 +0000 Received: from SN1PR12MB2574.namprd12.prod.outlook.com ([fe80::65e1:fc53:30a9:b47a]) by SN1PR12MB2574.namprd12.prod.outlook.com ([fe80::65e1:fc53:30a9:b47a%5]) with mapi id 15.20.1294.028; Sun, 4 Nov 2018 04:50:53 +0000 From: "Kumar, Ravi1" To: Ferruh Yigit CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] crypto/ccp: fix resource leak Thread-Index: AQHUbmSygIQicCRQnkSP8DlBxLiUrqU/Fx4Q Date: Sun, 4 Nov 2018 04:50:53 +0000 Message-ID: References: <20181028031928.46445-1-ferruh.yigit@intel.com> In-Reply-To: <20181028031928.46445-1-ferruh.yigit@intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; x-originating-ip: [202.56.249.162] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN1PR12MB0207; 20:cVsPx8KxPguujTwvnh6y2lgmz7GFPd9eybFyXc7Kb57/aX6bdLW+7PFYYYGsjQp3yAEFSWlsTxbGjUKg7BYMUDTloqc9dCDhNz3/df6W00f5jH7hZO3pRV4v4HOER26QpsdogC/sQKVZLULZTPBZPzMH9SIXuX1/rqTgkh5euEXChuHUz+/lt3kpGjfP2CXPnephuoHVPtP3Ahv88CZjeNDwrHECB+eR9Dbp0XXSrgwU1pHKZ+vBIPbeTglVAz1w x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 70167e46-d41d-4d00-10a8-08d6421119fd x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:SN1PR12MB0207; x-ms-traffictypediagnostic: SN1PR12MB0207: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231382)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:SN1PR12MB0207; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0207; x-forefront-prvs: 084674B2CF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(136003)(396003)(366004)(376002)(189003)(199004)(6506007)(4326008)(2900100001)(229853002)(476003)(486006)(446003)(11346002)(14454004)(99286004)(76176011)(33656002)(7696005)(2906002)(478600001)(74316002)(55016002)(106356001)(25786009)(6436002)(9686003)(105586002)(6116002)(53936002)(66066001)(81166006)(8676002)(26005)(102836004)(81156014)(186003)(8936002)(5660300001)(72206003)(3846002)(6916009)(86362001)(7736002)(6246003)(256004)(14444005)(305945005)(68736007)(97736004)(316002)(54906003)(71190400001)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0207; H:SN1PR12MB2574.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: BDc4eVAOI3TFUuOhKA6+wqX/rKRgIdHBbG97wb9dwKv0Mx/T8E7XU1cn5X1N4BexNnlplGZSaxU7UfQ+rMHrXbVprMak6MRW+icsus+l4ocVpejEldeGOFTkXHxc5TLyNjPdEn6vszUYN6AZivL0sYs7L8XDl9DlNLO7KV45nQLoqPbC+0f3YTDeRKtFlJ5qz9vCXkbEHEkwiKf6LT9DUkJwY+N0nCs5nOHnMnIBaZ+/+DDVzjJVz/944JIAKNEWd5oTmiBVW/DPZVNjtaozDYLeHUKRL0QVhTiGo3d4gK1v3xrogMchb36bPMV9Razt98ue+VPmR+P+ATjbmb8lCmXxR38ZUGfI0W9UGdlSAPU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 70167e46-d41d-4d00-10a8-08d6421119fd X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Nov 2018 04:50:53.6146 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0207 Subject: Re: [dpdk-dev] [PATCH] crypto/ccp: fix resource leak X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2018 04:50:58 -0000 >File *fp, opened but not closed, this patch add fclose(fp) > >Fixes: ef4b04f87fa6 ("crypto/ccp: support device init") >Cc: stable@dpdk.org > >Signed-off-by: Ferruh Yigit >--- > drivers/crypto/ccp/ccp_pci.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/drivers/crypto/ccp/ccp_pci.c b/drivers/crypto/ccp/ccp_pci.c i= ndex 59152ca5d..1702a09c4 100644 >--- a/drivers/crypto/ccp/ccp_pci.c >+++ b/drivers/crypto/ccp/ccp_pci.c >@@ -31,12 +31,15 @@ ccp_check_pci_uio_module(void) > while (uio_module_names[i] !=3D NULL) { > while (fgets(buf, sizeof(buf), fp) !=3D NULL) { > if (!strncmp(buf, uio_module_names[i], >- strlen(uio_module_names[i]))) >+ strlen(uio_module_names[i]))) { >+ fclose(fp); > return i; >+ } > } > i++; > rewind(fp); > } >+ fclose(fp); > printf("Insert igb_uio or uio_pci_generic kernel module(s)"); > return -1;/* uio not inserted */ > } >-- >2.17.2 > Thanks Ferruh for the find. Looks good to me. Regards, Ravi