From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7487945B00; Thu, 10 Oct 2024 11:18:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14C8440669; Thu, 10 Oct 2024 11:18:06 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2119.outbound.protection.outlook.com [40.107.94.119]) by mails.dpdk.org (Postfix) with ESMTP id DF39D4067D; Thu, 10 Oct 2024 11:17:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rEFy8AoqZ4/4bJgTes/jdPZudvfkDsfrAsd7OSyzlETLuxziKbNhnA1wmckFKpfZOqB4CjQaOy4Np7F/5qjj0eWyjJvAriacvuVVtdyHVUjznkIzLfCVEIsWFO8d19L7KFeSWRHz8ApkZO2nl5vCbIVnolSBZTmnJM7Ll6B7sP34hqhX+1+OYziC53FPscRT4Y4dzi+1ETZ6O+gjcaFRO77iPu0OD/7kR3HPvucUbZjB4MONeVMkbiaHekokfaaCmvxswFJo4aJ0zZmNTC9Z7VUGcv3uZCQIdMAV/pS3bggGaQmlbAWCX+J2W2BFC4f5RHNrfC5TT++bcz7qvDPz6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=G0CWZi/hMPABcOIMUNgdjBF+bNFWPncPWovo0Fef0Pw=; b=aE8gEKkKKA+mKHbcRE96l0CRcPRLyS60EnoTGQ9xRlOLUme2G+P/ji6PBJJp27SaCeIGyMMMauGMEih1/0xUsRqdG4DE6PbEMW6ctoWK/kHYBmle7K/29XRsJ3irvdnfndHS9+J1zoXRLPUGwTfIumQy9roinsV0kLzR5IuZ3MMTKTj6h7MNcV+PRR3B15CJS/JIW63r+lgVbtJMKz0srXOweOa5qUsGCW63NByVUHR646WjHYH5ed8imO3y3vX2BvdTfyOHK3c3Q+aczNt1LQ5n35IPwT1Ih+OTaq7zIEJZMDJ5168SSWIG32mw8lfoW92lhLoj1wfI4B0aO6e6eg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G0CWZi/hMPABcOIMUNgdjBF+bNFWPncPWovo0Fef0Pw=; b=ET8Qb/pdaxO22SYiEcYrncuEt6HzCwFofzHaQ88/vigxdqyWM/Ly4HmTU24GI1opTr6x7FXRoLDx68EknvZ32sRy7kLni63QkGJ7GYFjmtcP9aUqvPytm+w+SNmtiluGEhPYjSpiz449XixH7rwgGlG1Ch/gE1/hhntyPGrOWck= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SJ2PR13MB6117.namprd13.prod.outlook.com (2603:10b6:a03:4f8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Thu, 10 Oct 2024 09:17:58 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%5]) with mapi id 15.20.8026.020; Thu, 10 Oct 2024 09:17:58 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH 10/10] net/nfp: fix memory leak in VF initialization logic Date: Thu, 10 Oct 2024 17:17:16 +0800 Message-Id: <20241010091716.3631747-11-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20241010091716.3631747-1-chaoyong.he@corigine.com> References: <20241010091716.3631747-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TP0P295CA0060.TWNP295.PROD.OUTLOOK.COM (2603:1096:910:3::15) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SJ2PR13MB6117:EE_ X-MS-Office365-Filtering-Correlation-Id: 230baaff-141f-43e0-08b2-08dce90c6e8d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?1PEKbiTWdmYVYZlRrjEwH6H6GQSASXiQKKkdVH0AhPiYZQUbLc9DLlSwwd+k?= =?us-ascii?Q?krwj6HpqRVIEnfPZ8JDDj0SwsqJIaMGeVIJuCpl3zDmqeHCJ/5ki5XtLagAz?= =?us-ascii?Q?1+1l2CneWeMwDJ8a/MvbhvsLlwEx0bsu0KXhW+Vus5xQfcLOvGbJjsT2r3Q0?= =?us-ascii?Q?Lo9U8o7w5SPevUfugjk7pfBaiG8npCGO7d/0I994bRWl/OVJga/Z+BP42gGa?= =?us-ascii?Q?XL7yZrArg+CZLb4NObkC0U004yZRFms3POmiBLtw3WIQw/cO5qp0P8usSj+9?= =?us-ascii?Q?nf0N1yqUlwOqlJgWCXqnItIClXKyC4BoU10pHIkfezynODaPBTMmbWspnra4?= =?us-ascii?Q?++AQ2Tv8lGMb+OjC7ZU6R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4Vl76gfZiJDtSXkhLbJHx4SbU5JB9VWaPTWKxGFbhqn0OggLosD0uH2k+n?= =?us-ascii?Q?IQ8BGaltePEi77toSLbZvZRk2E25Oba8RfGF/Ea8SiryZA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?UGXcERhPbWXVRNof5IffwQVEuQO96YYwtWFpQFkDMlC5rt/WVYY5irzHZ56G?= =?us-ascii?Q?qb7DXnycnMZa9DOo1nDaAoXaVZV5DIv6Ue2f/9aa5ib5Puh3HybZSZxb0Asm?= =?us-ascii?Q?QvK3M2fUPMjDJitdQoQL4G88GCKyM2dGndyvY9VRleLHLpsqus6sW3Vb/BEu?= =?us-ascii?Q?X+zduMhaYpOecqyg+xUoXk3WCqJQ7PEzrJY8IFXElwaVnzbXegx0H+jSRcRn?= =?us-ascii?Q?rMQ7mhWttiK/HWX6C6140ohrDtzqI6JCyOkfdErNK4jBFyfwSsXFwscsR2Nc?= =?us-ascii?Q?K9hBQx4zNfkyXh3y2mUV4Nq2wqzFKUVhQAToZGHFP/rF4DXyq3NdywxEZbXg?= =?us-ascii?Q?vMXpWB425GrRHmXLvVQqO6mOCgNWsJXiTFjiEuCytRHbhNZauBfjMfuMxm2x?= =?us-ascii?Q?SR/cokkc+1wR7p/WZNLmvAcG0CS8RdieOFV6sAiZiiW1euzzSRkTuOOnllDQ?= =?us-ascii?Q?o/OtDWLrZNhSrIutXv60J8anfvsoBbOev4Zpa6nA/IrFUmYXQRaxfm9ZFYNe?= =?us-ascii?Q?UAgdpGoHIxT1CojNmbPJ3dZXbIfgYrzG9WEZ8cEGZpWlsoQqS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qet1Y6Oje9Gd6DYLa+zf8TG+H?= =?us-ascii?Q?9rGX6PWxUjux5W9lXRf0FXAzvgSLnIty16uLGJx8ITyKhDXNWdBh0hDwobRH?= =?us-ascii?Q?ORMPEXhPSvO6QUyqcGEUrVXAbMlMVfOj2qE3pzU0Qx33afmK4DtNBnzomymP?= =?us-ascii?Q?Xw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 230baaff-141f-43e0-08b2-08dce90c6e8d X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2024 09:17:58.6245 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DFXPI75AnsWzDA5HGXmWSOuRVuhP5nVpCMYxfNIm5j5nzjtWotOWel+CkVANTZksLhBmv40EUWCkJ2g++zsRvlhQCnbpG8Q7HDGv648VB74= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR13MB6117 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Fix one memory leak problem in the logic of VF initialization. Fixes: d81e2b514dc9 ("net/nfp: move device info into process private data") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_ethdev_vf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c index ab413a2c5a..0a25730bf1 100644 --- a/drivers/net/nfp/nfp_ethdev_vf.c +++ b/drivers/net/nfp/nfp_ethdev_vf.c @@ -327,7 +327,8 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev) if (net_hw->eth_xstats_base == NULL) { PMD_INIT_LOG(ERR, "No memory for xstats base values on device %s!", pci_dev->device.name); - return -ENOMEM; + err = -ENOMEM; + goto hw_priv_free; } /* Work out where in the BAR the queues start. */ -- 2.39.1