From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0067.outbound.protection.outlook.com [104.47.1.67]) by dpdk.org (Postfix) with ESMTP id 61E1E1B781; Mon, 9 Apr 2018 12:25:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=qk+ZMbwELtwuxBZtYuJ2Fy6g0MYTZQih/wf/Qzx32hI=; b=hJCU/k4cO3u1JHjcSh+FY6IIE79JipMr9vSSniqmEjk6F0rfK6m6uf9Fx45iRAdSkoBDBtOEU8Asy4jcrK9to+U0qDONf4YlTtmI0lo69Uo/VfoiEkesZ3YpT8ImpInm+9TpacSEORf85KVM5rdtcycjmmmH82lTZJ8yv42nSlU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Mon, 9 Apr 2018 10:25:48 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Sunil Kumar Kori , stable@dpdk.org Date: Mon, 9 Apr 2018 15:52:44 +0530 Message-Id: <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> References: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0067.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::29) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5fb09e21-4388-4fa1-e0ff-08d59e0443b0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:V613vZZoZiHqe9Y5yQqwFTm+lx1j3gXo/xr/LWziahVOXrmy7acnE6UTSnEFAKCedCoYFy5jKQHPUhTzWbfm+SpVW96D2i9vZHcy6jb+zRGnyeKXAPY6PtUrUT43MGX03pct4xaR7kXnTr5MZXOwwrzWZG1BnlYF2HQlxzkP6dpZOLSy31XN/qGjWioL7ZN9pYdBuEuAv76b4cnY0TtcPY6nlqa7qzFfvgtSNfNvc4rH8qOEa7GrRCT3bX8ylADQ; 25:ndh+8CqeWvgil3ixBUa+bVLxR4kVcbGI2bU1LYeWICG7Olr2wbp3ovF08jLjeSP0fL402JKd40UQb2qy5JcGZcMeOlsb6nMVBgmd2Lehxj1q+RtSM+Z53j1yT8YN/f8Z3WhJt6sMqg/JpHrCwhtjD6NrTDl6i4b8Mi7oKAsX083O4LYQr2w8+7RgNtD9/3w9JmJH+8QLuMv3NJHeNzvhHED/QvQhVnL4sar6MJptK3mTx3do8XvwP1eHPNSg7i6Z4+jiCNijLi8AU2WM4i1nRRGR4bURMYRVD/f6ZSSGSbbxrh4XRHQcZ9IfwGGN0pon4g7xtrxYU7jMIjE05WYLQg==; 31:AMg5MHLIhVRwQV4FNsJoCkMIc/CLl+BZNtrCKExLny7rD0JYrF7MKtAI6qB5UTfQPedam9Vso05asYXBDW5PGujnOcBOHJb3McKej+pMqVA5PxrqoX21Lop1tfj55r5iv8J/tbUNTCrl3HDdGvnMu3i3DcvzhC0G919Z1/13Y1LCV/4FgtFQuZp7OiSr8MdMm4w3mAqTMPPRAfrGmjSCsyE1ulZ4Q27/zbLaFFp0GZA= X-MS-TrafficTypeDiagnostic: AM2PR04MB0756: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 20:SUyecx58NYdENLV/VNexGQbOPR5xDffPX5IlJhGX/8fBXQXphVLSeKOrd5cUXuJtL+qm2OK9pXiG3WWUUP4tCUlEszMKgf4xBW1Ri8bcGOQdr+kDXNL3hlNpC8pfAKnCRuuwNmNo7xRmaLvkgn+xM33SNgsjRTl2jxJl0gpYpLgFsKPXaDwgfw1ig6NoNG73kMjAGCJtU5+O1sev8GrI+1bh6FJooR1dKfpWPnB4oVzalwJ0uylexeAK3mfeDLKPklzdQS5f4cdwpy2q4mR/mZJBC9GdY8ib9M2c27MKQr3AFOPh7tRSYWTR8RC3UkkCNxmatrB4nCrHEnjX9fM8ZSMw7J7tE/vwzSLL5hbKpXgzOVU5cy9O+YEmASOJ0NczEkLl8NfqE+BKD7HwJSJ8VDRpKWlUqcF/bs0WVUFuBr0eooVkqt/x61JImio5NktO3BZ8pjLGC6mEYtHm0fRCgkNFNgGW6Ttrajh8alF/Y7Bj72NAaPEDSRf/Shp3AAuQ; 4:Gemxm9wFoKvbqL5/JhjV4av3hX2LRPsxkLsZccpPOHT776bs1WwVEEKfdnDboZYoDnL8wlONno/N5WVOqeyr3Q9AduTqlwLeY3C/NBAQSR+LggHqY8SZRb7F6vnE9PHf1AYR7Rlg6nLTJ8jVC8M531P7LS5JZNA/lFBcqqGUEy38hd/AC3Lz9Spx4cyaBMRGKFqN5v2RnedE8Bl9cMh1ww3UcvcQBSjl6Wd/lSZr5DGQL7/fhEI53SiDaz6J7CIEX+Jsy11krXQxluhrGlcE2W8cZg5WYchmTMXniR5i1u51+MSoAeLmR3DEi8nuy9FCvp5LAFnqDnFogZgUDaooDIr+ad/MjIluCphdykRlHYo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39380400002)(39860400002)(396003)(366004)(199004)(189003)(36756003)(48376002)(50466002)(8936002)(6486002)(6916009)(81156014)(50226002)(6666003)(81166006)(8676002)(106356001)(68736007)(316002)(16526019)(3846002)(16586007)(2351001)(2361001)(47776003)(2616005)(26005)(6506007)(386003)(59450400001)(55236004)(66066001)(6116002)(305945005)(97736004)(76176011)(7736002)(956004)(52116002)(51416003)(476003)(486006)(53936002)(186003)(2906002)(575784001)(86362001)(4326008)(6512007)(25786009)(446003)(5660300001)(478600001)(105586002)(5009440100003)(11346002)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:GTFgZdI6Ty6p4Q3G5p8aHf6FlhoA58ooImdSnBEih?= =?us-ascii?Q?QG1RCP9V+UmRjsrq+GYekYOy3TR2+3vAUydbABQoYr6A+HVvYzl8ClnR3dSk?= =?us-ascii?Q?CyYTuJ/4YwBPp9I7fm1xlgPAKYc+k2PXte80dkcjtCXoQodZfZjBKqsm5zm+?= =?us-ascii?Q?xnwdBCiiHhYFUBhcfvnGZIhcoMguMYtUh4DPqLMhhu+41SEiwToJ5aoVhBeV?= =?us-ascii?Q?QtA1Zmbbzn4os9H8MBqFfreWHri4OQJkm+f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hasZJp3RATIlN2vb8SroVAR2p8CVkx0SIHUhMnsHXjKbU6zTyJmcvvyfIbnSMGxqqhGUAnCEVrn8FyNhc/srzlHS4M=; 24:QoMxtLYJZOHE79xAq6muJ6EFGQV6msJeszYv0CRNTP24/VCsguVZ1eiHNitB2oTTmTpTDWbPosRbpQdPeM5FCC6hdiNUUpL/e3/mUbOQn8s= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 7:tRnOjdjr9gqFrvXZTGsgJRq0uEl92pv6yBROk8W89xMeYoRCJZdk7tpD7S4I/tnOWtIQ2y5u6txfNG+IC5r0UuQYg5T4TnNyMPvB6qnhR8/XFg4O75CO2hm3r6ZHJkdrAiaH2EA2KcpquOF2R79s7m6VlisolaVyyfQM3Mz9r+vcgjsxapfz12tcD6PhPAqMq/QC2TgQtndkOADS6QdgKvtNS+8r0FKO//e0bCV1b+FBvDKTPujHpp4sdeFG/fdj X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 10:25:48.6141 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5fb09e21-4388-4fa1-e0ff-08d59e0443b0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-stable] [PATCH v2 1/8] bus/dpaa: fix the resource leak issue X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Apr 2018 10:25:51 -0000 From: Sunil Kumar Kori Fixes: 9d32ef0f5d61 ("bus/dpaa: support creating dynamic HW portal") Coverity issue: 268332 Cc: stable@dpdk.org Signed-off-by: Sunil Kumar Kori Acked-by: Hemant Agrawal --- drivers/bus/dpaa/base/qbman/qman_driver.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c index 66838d2..07b29d5 100644 --- a/drivers/bus/dpaa/base/qbman/qman_driver.c +++ b/drivers/bus/dpaa/base/qbman/qman_driver.c @@ -160,6 +160,7 @@ struct qman_portal *fsl_qman_portal_create(void) &cpuset); if (ret) { error(0, ret, "pthread_getaffinity_np()"); + kfree(q_pcfg); return NULL; } @@ -168,12 +169,14 @@ struct qman_portal *fsl_qman_portal_create(void) if (CPU_ISSET(loop, &cpuset)) { if (q_pcfg->cpu != -1) { pr_err("Thread is not affine to 1 cpu\n"); + kfree(q_pcfg); return NULL; } q_pcfg->cpu = loop; } if (q_pcfg->cpu == -1) { pr_err("Bug in getaffinity handling!\n"); + kfree(q_pcfg); return NULL; } @@ -183,6 +186,7 @@ struct qman_portal *fsl_qman_portal_create(void) ret = process_portal_map(&q_map); if (ret) { error(0, ret, "process_portal_map()"); + kfree(q_pcfg); return NULL; } q_pcfg->channel = q_map.channel; @@ -217,6 +221,7 @@ struct qman_portal *fsl_qman_portal_create(void) close(q_fd); err1: process_portal_unmap(&q_map.addr); + kfree(q_pcfg); return NULL; } -- 2.7.4