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 0C7E5460D6; Tue, 21 Jan 2025 18:09:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A6A740698; Tue, 21 Jan 2025 18:08:43 +0100 (CET) Received: from egress-ip11b.ess.de.barracuda.com (egress-ip11b.ess.de.barracuda.com [18.185.115.215]) by mails.dpdk.org (Postfix) with ESMTP id 8168D40650 for ; Tue, 21 Jan 2025 18:08:33 +0100 (CET) Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03lp2106.outbound.protection.outlook.com [104.47.30.106]) by mx-outbound22-172.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Jan 2025 17:08:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=F5MOhZvmzXEYH+JuCA3GP65GDXAzb+4FTM1iyuccjiOQF4wutXJgAEl3Dwx3uJ0wYa2hbG7Zi27lm/n0CDoRLQYT6PrLtQJdELvJknV0rFJnMWV34vtmdvVkhigvoHhRlXmx4mKZRLX3NyARc+7gSs2zk0HM8hUawkrYVcw8CJeIM3aiWlCfr/71lwBTJ22A8J1GhARxSgBU6vQiDJ+qvuAtMr4g9aen2UtAxDdsHP0vNzjK2c4rqsMh2JxdZPMkoBP5SO13sbxMPUQu3tsJfVDvXrS4Fad7JZoZWzzPPwGKgXKxPuXbIP5Vxn1coBiySZ4m08oDpQU3n8XsUgmP5w== 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=8DPBLE/ulgBNa9kGWwpKE9HpQti7GT8fm2dwBMXfO6Y=; b=If9kmXhUIXNzkpqbW1oc0dz5Pqwm0YUgWKeKGWE44+OdUR26l4mvzk2GAxCoyfDmwA2ceHQ0gROiqsnOqQSQjS0eU2+HBHrmyyoRrS1Yy7wxCVZRXFT7DUPal8Pan2LH89kIWy+TUhpQxIVVxuxrnAOtrK1zeIGOcSwD48pPLp/Zq/a0F3uK2+3v4R8gvk21aGeDHgks7B0UJD4j8MKpXXQcQJN9+D91aMvwZBYMvs6f0t78oXe+yqe6e00y+69pG/m4QVPzSmnu8b9x/Yhr/mmt4aeZ6OLlbu+oAlOxXNd3kot44EO4cv1eqg06GI9SpCkvYDjsIutmG9yC6Ug9yw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=dpdk.org smtp.mailfrom=napatech.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=napatech.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=napatech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8DPBLE/ulgBNa9kGWwpKE9HpQti7GT8fm2dwBMXfO6Y=; b=pITzjlwzHM7eISLePt3uF1ivPCaXFnAiaGFXEN6GOoRj2WwtT+DJvEMoKJIXaRjla79Jo0UJmv7oMModWAxfeqpJJcL8i7oxd6rWQ5n1kC3+IjqM1QoWMt7NA/x+17DkQ/D46ssPDf28PsEqVT0UxSW/gUYG4po8VsroRpES8yY= Received: from AS4P251CA0017.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::6) by VE1P190MB0990.EURP190.PROD.OUTLOOK.COM (2603:10a6:800:1a1::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.22; Tue, 21 Jan 2025 17:08:28 +0000 Received: from AM2PEPF0001C70A.eurprd05.prod.outlook.com (2603:10a6:20b:5d3:cafe::15) by AS4P251CA0017.outlook.office365.com (2603:10a6:20b:5d3::6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.21 via Frontend Transport; Tue, 21 Jan 2025 17:08:28 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 178.72.21.4) smtp.mailfrom=napatech.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=napatech.com; Received-SPF: Fail (protection.outlook.com: domain of napatech.com does not designate 178.72.21.4 as permitted sender) receiver=protection.outlook.com; client-ip=178.72.21.4; helo=localhost.localdomain; Received: from localhost.localdomain (178.72.21.4) by AM2PEPF0001C70A.mail.protection.outlook.com (10.167.16.198) with Microsoft SMTP Server id 15.20.8377.8 via Frontend Transport; Tue, 21 Jan 2025 17:08:27 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, stephen@networkplumber.org, Danylo Vodopianov , Ferruh Yigit Subject: [PATCH v1 08/31] net/ntnic: add proper var freed Date: Tue, 21 Jan 2025 18:07:46 +0100 Message-ID: <20250121170814.3252171-9-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20250121170814.3252171-1-sil-plv@napatech.com> References: <20250121170814.3252171-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PEPF0001C70A:EE_|VE1P190MB0990:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 0642318c-1c72-40fe-3d26-08dd3a3e3953 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?e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c3dm?= =?us-ascii?Q?cUiyr8viUQ15CQjSGdZXi1dU5sARCwfmwO4DI1/JhGNUYNeh/bfl5XID0Gfv?= =?us-ascii?Q?XKEGmQkmhDzzCS/RiCSvGDIck5X6qVxveggk558D9AchCgNHfk57Nf3CBKA2?= =?us-ascii?Q?jbCGMjei1yKGR1C+AVc/3g6yLB8aYyHvzz3hFiF6HhoO0AKBfmF7P1Tctd7c?= =?us-ascii?Q?/SPfC9i1LOLL+Zls1M1qAaINd1EDLVhHJLaJG/DrHdoj/h0cy/yjHdyKuk3h?= =?us-ascii?Q?n7zjCb7KCo7ZYP8ZvJX8ul3ZzsaK4DaXVNaQnZJ/o/UuAEi5le+vLl3vdfz1?= =?us-ascii?Q?qxFcOeOn2Nm3vZyZRRlRiTulPZSkVpkowDm2jk+xcaII9qRSjrMMXIv7WX5k?= =?us-ascii?Q?3Fqx6nGWhIKz99TvDA4XpjmbHxnKrpvLN5lgIRbHPeZjtjTlv7J7n9c0rI0l?= =?us-ascii?Q?geJNVABoiQQQnTNO/n+Ui2KYJjn+Z/8qtDV7XkY4qz9Eou/U6hSCuJbZrr1l?= =?us-ascii?Q?64GsHC+ByeA8v9MEVoO1QyWtd3wAt83aCKaXUCD3w2G2ikDNtHy+X58oQcqa?= =?us-ascii?Q?v+GgVa+nq0ATd2TrS/fdczLX8seQ/oVhA9dU33nEZGsz6Dg2pK2fVbvTLLbk?= =?us-ascii?Q?UWaksYKD7XJaXRg=3D?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 7tOCK1amg6m8Q3SZK3Y6AQvKLOkmAhXR3MunxdF3oLcVcxa5Cstgq7xI+eh4dkvVSp0jbPobu+IMxzKpvcoSUN+GSnC0WP30SWCmeVLfpO+0xaauhYbTSHhDBObyCx/23ounuNYGoOEBhgtNbI8b0P70U1Se8RRl49kCgmy2mCCEG3GA3JHW9sTRsz1k/yeANMtMDpQZtGNfq16A5kOXVQ06Rx2HQezA+oyBztxbuP2QemTFIas9n0NYWO907jCZGA0Q57lkwu8S5eWy1uQcXt6c0gfEZVV0HsA0GjpV5HZY+4t4lrgrHw6maYSzKQNzUOQPk4hIegf4z4JtQr/lUXLlgi4hqMyDNCDAN+o5gj4ZR1lq0ROUM9LBmLsobpFQI8EgjaZQbjul+vkbWb6GJK0fM6cZ1UjsNJCJMWCIu+2wQV7HKRDJxHJFkoK/aKsT8btSjEUH0+0mo5BJQXwQVQ9Cdvdco+B7Rf4edfCeSpXtjiUu+FG25WcKKlCNb2csJBHPPnFguM6mH013voKkcJXHFXglpxKZAM1FpLU6hr2NiRdoRKLuQ2FZRMDo/v4B/WKu2VY/8F6Iiail0p6QP+K5vW7UfXW4JCYt8pkgLNP3hYRTq2dyDijbnT/X9jaNGd0Gmihjh0V3f1zajRCrpQ== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2025 17:08:27.9212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0642318c-1c72-40fe-3d26-08dd3a3e3953 X-MS-Exchange-CrossTenant-Id: c4540d0b-728a-4233-9da5-9ea30c7ec3ed X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c4540d0b-728a-4233-9da5-9ea30c7ec3ed; Ip=[178.72.21.4]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF0001C70A.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1P190MB0990 X-BESS-ID: 1737479310-305804-13354-8282-1 X-BESS-VER: 2019.1_20250117.1903 X-BESS-Apparent-Source-IP: 104.47.30.106 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVpYGRkBGBlDMOM3EKC0pOcXM0N zM1DjFwijFPMk8NdnAMjU10SzJMEWpNhYAexpfk0AAAAA= X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261957 [from cloudscan23-161.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.50 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 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 From: Danylo Vodopianov p_fpga_mgr is properly freed when it's no longer needed CID 440546: Resource leak (RESOURCE_LEAK) Fixes: ddf184d0b6c2 ("net/ntnic: add FPGA initialization") Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/nthw/core/nthw_fpga.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ntnic/nthw/core/nthw_fpga.c b/drivers/net/ntnic/nthw/core/nthw_fpga.c index ca69a9d5b1..88641145ec 100644 --- a/drivers/net/ntnic/nthw/core/nthw_fpga.c +++ b/drivers/net/ntnic/nthw/core/nthw_fpga.c @@ -230,6 +230,8 @@ int nthw_fpga_init(struct fpga_info_s *p_fpga_info) if (p_fpga == NULL) { NT_LOG(ERR, NTHW, "%s: Unsupported FPGA: %s (%08X)", p_adapter_id_str, s_fpga_prod_ver_rev_str, p_fpga_info->n_fpga_build_time); + nthw_fpga_mgr_delete(p_fpga_mgr); + p_fpga_mgr = NULL; return -1; } -- 2.45.0