From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0066.outbound.protection.outlook.com [104.47.0.66]) by dpdk.org (Postfix) with ESMTP id 4D0AB1C9F6 for ; Thu, 5 Apr 2018 10:56:25 +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=YH+CXk53//pSXIoL0VOSMdGNtiBwH3ClefVBe7Ogreg=; b=TKVBj4RW2KaPe3HiNPvpq5hN9X0RuFbPQ+jac8K2qO+oglDyJ7k4aATWESqPPaTHqR8H51IiCMqH4y1t7W9/y8maHCzJKRl24WEdGLUeF50f2REsI1mE2ty3KjttpkY7jvadMWq6hE5HcbZB1F/jVeKy9XEkLuwSpgYouBOYQ1A= 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 DB3PR04MB0762.eurprd04.prod.outlook.com (2a01:111:e400:9440::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.631.10; Thu, 5 Apr 2018 08:56:23 +0000 From: Hemant Agrawal To: ferruh.yigit@intel.com Cc: dev@dpdk.org, shreyansh.jain@nxp.com Date: Thu, 5 Apr 2018 14:24:21 +0530 Message-Id: <1522918464-4586-5-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: MA1PR0101CA0043.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::29) To DB3PR04MB0762.eurprd04.prod.outlook.com (2a01:111:e400:9440::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 74b7866b-dcad-41f6-f88f-08d59ad31bff X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DB3PR04MB0762; X-Microsoft-Exchange-Diagnostics: 1; DB3PR04MB0762; 3:NXtl2CvwINKATZ1ufuxVnlCDVKJHkHWXJpFoTEWCOJuwx2Z9mI65u4P3cjrzk5nMW35BLlmUerVFoDR27GBUNQbctV7Fg0jiJYsuyR9Q2MaMpyXcoo1VZPXzLnfKmYK/ejH9vtvmTe3uhJRPuN93X+D6vOzjKnKE+nykaETMgsQBl3p6KNuHxG9QGAcu/uEm434ParVA+XeHJJ9Wl+zjOIDB1FcWShi9rez3aTaAbHB1wj0OV936tqBQv/qbtzOB; 25:1cV0lbCyCLe7jKO3ByOdncbj4l9ILnn7XqoVa7FK0DaTY6c5l8FjzhoxWYTb0zFh6UmjIRprqQarfO4rW8YR0PyBO//+m8zMSn1Lnhwd3tQbxJKMk/WWcl/8ga/diFW+rbUg4q3Mnf+mUaljp0otbbsQbom4pzqsMlxz0X2KrX2thIs2P+ccubTNTVBnZ5U41vSIejDmldfLUF1jMA/Od1Ns0OxnVsX74/2DcrUwvmxlmJhY4tMReMoQr+f/XzxCVwr5J9ciXDWd5Q9CN6BFpznToPUyoDJpOCwbA93vq9PyKSCnMFBcUW2R26CIkj/TC98FrVyEdiXjyY1aVb1GNQ==; 31:dlHWSeBcPM24yNp5YgKCfgMAiXZMipBL6qnwpeVIrqXKlePbvSXqIwc+OHpm7nViyaOjzYn9gla01cs3xAQ0i3If7iv3ohtkidJmVxLHNN9NGQjHYeP9sy846+OSt3Y56/o9SNfjS2NkW0jplrYYVLEkOWbtwIyDEnNoU0mQJ7GF0DJVlArDDtYnM8+u8Td7XXNt5GjTGiK8rjTyLBUMXvVl/gdZQy0Hr660OpvG/7k= X-MS-TrafficTypeDiagnostic: DB3PR04MB0762: X-Microsoft-Exchange-Diagnostics: 1; DB3PR04MB0762; 20:CxrJU/Cvng6lwosXmvKGk1oIK12Y8rCPCgOCP1z2OUWBxE7Kz6xxlTJAU/lDo3Y/fcRh4GHPoe/xzqxYWDwZYMPl+mD8NPceYlAQQ0g6Rul5jjSX65NJ5ZmuC1J3hUX3rnXV6Y5rBi4bDKUa2mGAluCohOkPMjW02pQTvY01Dmc0ReLKfWt40gwuCCjAUjIv7SVpATklkUAuEWsz2mIB4OvW+PftG140ZnxS7hApvslQYCxZgbk/dbwUdMD0E+A45EuuTWghZpe0g0hDBOFHe7EyNGXegK2HW4hRKvUeT2pWQKlSsbrrbeDXNvxbdSmjVGhQxIt9RyY8QScQjSxJ/mnvxumkYRp42LyWQy+eFSWYBU17uWi0j8aUDTknmcvdjNmCwMYE+o6PaXOMi9kjMyjoXUzKtCp2IY6ES35VlXB+4OM0FbWSY5fjHKgub7qSmBoe0IRiM3pQD3X4r7bHoiJY4v8Li1SOlIv2p/ccaPOLUwvk7FBDwMghvHdhwqRv; 4:zOTFQffQcNLqgrmCsHRWUyF9+p3Unxtdo3nGSctk3zbbwbmuInZHZzamRYOnznNlgHF7SEjf3VR96X+q7RQ0HF800j9kgaNo2MZf/QcroQ4fRfhPoohweg8qd22WGKVEJIpk1D4xtcn2bkrWgzJoK+MSItrByOcjxQ1yXq7As+69xU0BznnSDFcQCu1bZF32ReibPcDJV5sJWmSsxJ+VdE/6ac9ELmGFGMRPO7iXGwhYXvj9vIU650U192toyr+CYVo3/Ficy8FraNQLgRDbODqkdbl0tPt1kfnBxCbQ6wrjYzXHAo3YqBh96md1D4Ll 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)(3002001)(3231221)(944501327)(52105095)(93006095)(93001095)(10201501046)(6055026)(6041310)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DB3PR04MB0762; BCL:0; PCL:0; RULEID:; SRVR:DB3PR04MB0762; X-Forefront-PRVS: 06339BAE63 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(376002)(346002)(39860400002)(39380400002)(189003)(199004)(76176011)(81166006)(53936002)(2361001)(2351001)(6916009)(25786009)(7736002)(476003)(50226002)(86362001)(81156014)(486006)(97736004)(105586002)(26005)(6512007)(52116002)(3846002)(11346002)(8936002)(446003)(16526019)(106356001)(51416003)(8676002)(386003)(48376002)(6486002)(47776003)(66066001)(68736007)(5660300001)(956004)(55236004)(478600001)(36756003)(6506007)(2906002)(2616005)(5009440100003)(305945005)(4326008)(6116002)(50466002)(186003)(316002)(16586007)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR04MB0762; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB3PR04MB0762; 23:XHGYg0cRjRP78zfSO6TwId4uK0N4sf9bY+tLouG+v?= =?us-ascii?Q?TlkGJ92EpZiAEjXSUheBG93Vq0MU7+SGfw0vxgLZr2eauoAymn6LowXqFD1g?= =?us-ascii?Q?zNPOSXDenqrxZoG4DY4IwsNYjp5VoNJfIbP7I3pj8kZyE9z29o8Jfp9Fp+Gm?= =?us-ascii?Q?7aQyo3MbMwzpfNav7K8ynmpIeUWVDoApkwu8gG3y3t+inZD+k6uRmxGIi/JE?= =?us-ascii?Q?lo3GtM2HPh9wSKhL8n5jKyyYLgTqEJIGjzvXNqST0jYBUVhq/6Xovn9O+dby?= =?us-ascii?Q?GKb7rjaJxnTZHSP4dGMghVnpRX6TeCe4xN24XXz7/xT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ykppi4HE30s6pwy4dcR2/r3UCBIEm03uw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB3PR04MB0762; 7:aAdoV9qWu8V+XZMinRDUP+wxiRPD3Bx85yo0qZHXIlhGgRR4+Q+tKdZL62O8LEuAOyG1bFAPf8TUW3oE1y+4LEH9mUe26OZAWWMUKL19ZYPsOvDHdFSTwb+Mdhun9KS/1FsWZUNUGcLx5fnPtTnVCkrQ0ssagz60QWg08QI1vrmrm55IoWjfYxCjGhGa3RAkhyNMnmP9+rNG87tOT3fG0dikXNnkdlp3CpTcYRgBAZPVaRaUE2gcGHXCAj7BbIrZ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2018 08:56:23.1798 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 74b7866b-dcad-41f6-f88f-08d59ad31bff X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR04MB0762 Subject: [dpdk-dev] [PATCH 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: Thu, 05 Apr 2018 08:56:26 -0000 Fixes: 1459585888b5 ("bus/dpaa: fix memory allocation during scan") Coverity issue: 268337 Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- 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