From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0070.outbound.protection.outlook.com [104.47.1.70]) by dpdk.org (Postfix) with ESMTP id 7A5A51B7BB; Mon, 9 Apr 2018 12:25:55 +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=xVE3IezyI489z7A8LrL9IHJJcrCaMlD4o6gbV/Skyp8=; b=JcG8DanYUuHlgPkBxY9XAjhqxiya4M28YaX3Y7Jh2UTpCX9cDLR8WRcdeppq3DpSSiAGEUNXnA5nEEY5yGpxWoBWZqblp8sXZPfANpfiGp3dSUw2o5yfqcfatCPDeZ8O6BDDwfY82LIF53X9LPMBT3vzL8HdSrJn8pK0Mkt7NNQ= 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:53 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, stable@dpdk.org Date: Mon, 9 Apr 2018 15:52:48 +0530 Message-Id: <1523269371-28799-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> References: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> <1523269371-28799-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: b4fe07c8-0f88-4d6f-d18a-08d59e0446ab 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:cAbFE+uLjNjewPxrHNcs4UJ3mVqt+UrUPfABSCUKoXrlda6EkrH9TCp4dF6TuZmYoesA+bXqnIeZqNk83uzeqUVXXTRYdVWstiCRiuygiG/+MpoRGtCEIO4K45A0CX51JSZWJH+t0KWn1c7uCSfK3gvxtzsBQxivHWXTEbinJicEIyQggeBmxROkk875dTXHsYltaqKDe5Ia6rUcFdYUYyIkbpkKPLdOWSWSjnLRIrMls8AO2jE8ZBkh/cI7f9Qf; 25:zSkLBZGwoWfGKB7uAJtzjLYHd+cMt5XIFLKSv4ThPnHACmuEHyXNHK8tBUPaQ6y0piNfErzE/Jmt/jD+SE2CyQ5V6adlwxY8hwF+e3bHOu7o/ue6CVP3WQfbGNEGGZZmfFUWlWX5ClZRXmk7/WC+1yWlGa1u8HjhD3ptUsHjkiYT8E41JXLnQaU3ydau3aTHtIt/8/78BJ2wbFyiJd2ER3+kiRSyKhdgF4pe9S+kBNB6JZs2dijMs74AfqImhojyegf37NX5iYtqPKi3h3vkZE1Ivs00phhAGLZ01SBr/0nZHgjHxEXF7TJlMM0kHTEfRUN9CjtMLREwo5Wv+U9vZg==; 31:1tjHrnJVhVMT3rbt273C0qBgzoPO277kEIBxXPoUx+lSIaO7yXYjp8NaN9aNgEHiKRI2pTXytLeVT3i5YE6A9cev5tLPQxcuRIhrhnAIldmzNxD19wZxxcUeMaaeBVJ4Z/N63E5HCE8fn5rnLl4/q/nIniSCx0JXfKbOT3mPxr9BeK3xJCKrYqeUhnYZbdM3vv7SF9Hq5Mpzkd30L2bnat1GWkJGRMtcZ+aIdmdFdp0= X-MS-TrafficTypeDiagnostic: AM2PR04MB0756: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 20:4b2YZ41VVZgiQvfLxiuPL+pjOXvtcZU9WXzHGvc49LOmUcklb/+tD5+5a/FSv0wxv8cv3ECrE4Hwf0/V2Ctt8M4jRa1oCvF5P6R6zSUycTFoP6sAtGy7Z275QKBjcoDsa3HZ2am0ZdAijYZ4NGIbazkvO/Vy0voYnbGajJh8/SQP9vdUcvYjk2wlIj+J4zGJv0NUJ57/gbxuICg4pKzG1D1jaok85KqZjQhi1fVpDds4dvWlIFl8sTh1/DIMQeGh/PgSr27VFKWS8gx4XzutevBYEzb34NeVFdtHvYPtm67iPI/z3RkXxQfbWlHCWtVcmdJ1WOt7PsgAjMMSgnZBtvYwtGTPBLj/IeieiO+pQi6iWdCbMR7B1Es5WCpLxBLNFUaduzGYaGSdfJzvRLr8XaDX1dCE9Bc/NAwsYlKWuVqgqjL4/DEqjK/LGMoo6/2hcrfClgfFbJeOqW0qampp3NS2vvA5TsSgzKErgtpvR1NORCiS7uP882snmwMYMigE; 4:gLm7fphQ8OAvw709hksu7YzAEeecpZGdvsqbao0SDNdNhwBFJjzFDcg9Bxr8pchcY4M5oXD05CYjr9ky4nTbk6QEUWAqdyD5w5Ruii02XZI+ZOGQmlr7o47JZ3/mFBURz/DyrJCnu5yLp6cHRJ3pGDnXjA/P1gi27hnfh0bKQieDSiHFkprOOTkrs4uW66Ve07oGf3JsDRRssTWSJdqoRuDWSVcrRr4TcobVIl7G0t/Ifn6djuAOQ/XFDKfM5GdAu1OJefLKoYmbDn0e9VnuFhY69uud1OYqnf+3VFLSPM4p9XrYhrIbC5PonQUYgw5g X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); 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)(55236004)(66066001)(6116002)(305945005)(97736004)(76176011)(7736002)(956004)(52116002)(51416003)(476003)(486006)(53936002)(186003)(2906002)(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:IP9dV+XVgiFjN1Czk11A50LiIYKLIhv4dCHNYLpdn?= =?us-ascii?Q?8hu/M7PdmNxiTBRfFmHwQdrBPPLqHF6msmQjWZmh+piSITpPONQv+cbam5iL?= =?us-ascii?Q?flwrJeRqHK/RwDPREKtng6oZqDhhBdtwZueYRllfeVR0CsVbWPSByh5bNWQi?= =?us-ascii?Q?6biNWgHBQthgHhn0ncd5aj7Vs5rCwo8CJDwX1fyL6dmDWmyTt+4vUURH29aw?= =?us-ascii?Q?VsoScwD7AHhRvBLaGXMBlKOHpSm/O85XcomPQ61HHTHSPOLZlkzgg6mezomz?= =?us-ascii?Q?j5i/bbWDR/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rE/cuZnZrbAb8Z3Vw=; 24:u86JupEl6X0WGR7u2X7YgSuCdN4963UrIEosLR0dRflWYtkApIQQwSGVjjvZUuqzRNk43itm5qDPDFHjtwas2eA1HIRMZepo09Nb/B4/2As= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 7:nKMLrlx+PXT/a0cq+aDtLr5OZ2HstnFvTjV+JnLkhHM7H2Lz8GXzn7UlkIdqpyWyLamjYYtt1Ma/47doJ+y/6Xc0RzHlNNxaoXJmw5FJ9yNNKbnFZUcVE185mZV2OY8RbCziImGNzLJAaTM2RNld26t2m7b7on5YrI7v8nIFYUrHJxOqVyQiMWFHP8B/v1Glg+DoV6wpuC7PwfMgusFu4UCRZ3p2YnKaGGCGa4TGYlfuOwXbUmWgSm7onL4I/zi0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 10:25:53.7860 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b4fe07c8-0f88-4d6f-d18a-08d59e0446ab X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v2 5/8] bus/dpaa: 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: Mon, 09 Apr 2018 10:25:55 -0000 Fixes: 1459585888b5 ("bus/dpaa: fix memory allocation during scan") Coverity issue: 268337 Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal Acked-By: Shreyansh Jain --- drivers/bus/dpaa/base/fman/fman.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c index e6fd5f3..be91da4 100644 --- a/drivers/bus/dpaa/base/fman/fman.c +++ b/drivers/bus/dpaa/base/fman/fman.c @@ -442,6 +442,7 @@ fman_if_init(const struct device_node *dpa_node) if (!pool_node) { FMAN_ERR(-ENXIO, "%s: bad fsl,bman-buffer-pools\n", dname); + free(bpool); goto err; } pname = pool_node->full_name; @@ -449,6 +450,7 @@ fman_if_init(const struct device_node *dpa_node) prop = of_get_property(pool_node, "fsl,bpid", &proplen); if (!prop) { FMAN_ERR(-EINVAL, "%s: no fsl,bpid\n", pname); + free(bpool); goto err; } assert(proplen == sizeof(*prop)); -- 2.7.4