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 BE70E460D6; Tue, 21 Jan 2025 18:10:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B7F2940A6C; Tue, 21 Jan 2025 18:08:53 +0100 (CET) Received: from egress-ip42b.ess.de.barracuda.com (egress-ip42b.ess.de.barracuda.com [18.185.115.246]) by mails.dpdk.org (Postfix) with ESMTP id D7FD84067B for ; Tue, 21 Jan 2025 18:08:39 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2168.outbound.protection.outlook.com [104.47.17.168]) by mx-outbound40-251.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Jan 2025 17:08:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JGDOw91y5sckGWHYVm17SEncYm0GbayecMsVypefuWW4df5yw/m8UenlpEnl3JKFHFK0cpFbJjV1JfcaRCNk6gNQjVMK+Yoxs5UhPB8EhGNaA6EApOySgMoPY3Ckf6zwj/TG9T/3+T8LnangN0h0nS47N1gJLVaUWtMj/NS8kG+v3aEBIMBrWqj2h4SsUcYzQ3RRzJL6L5gl97Kd1VY0zO2Ou6+jskoJ9grTKHih79HXbu4QUKHDmLG1PRVV2r3IS0z+qc0agFB0pAX9v74cSYsD7QmPRy76lGwldofzbRtnNBkNxYg4OGytqDvcPgpbWrxjydE24jnMtQhBjMjhuw== 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=cEUriyc16NGu+FPzZLOffrSF94Z9zxsFCA6OiEJKVTU=; b=sWPDA6keyBZSxHGM+sMzNzRubzxJNFq7lR6u/bTPWT/Aeb3mP5rhiL1qlVv5KCKaocVvY48Z0ng8bB7ls6CrCVPKeIJs4QNWkYH7bkKER/pI0gdxMImwLkgl0AL8S6kt9S2IcDFh9mt6RAzsmpk9J3AoAkAuiZEFb/ojsPOyvkz7kNcFv+nTrVr0iOM012vXc5IdrqwY16Nlz0sqt/CoIe7POS9NZCjODTSiSh5ByjpZSew7tIu3mKi+7jKAQUSlTCyULupyId2ZmXwVYDbU2px4b5puhyv56LY9jog4UDQbAW68pChKIlauWyB6zjbJx0f95KdvgUzs7WHJtr0Z/Q== 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=cEUriyc16NGu+FPzZLOffrSF94Z9zxsFCA6OiEJKVTU=; b=go/O6/IJoL/pDuIlrMZYPScXAdNShreiK42ATYsxy6HUI1FEFMuhuTZqo4H4F+SlCoTjpNKiDtgj+93wtGK1svIf2NnzRT9kwYA0w2KgWAdNllRybErwlg/2xVwsVk+fnH9Kl6nRQ/moR8oChTO0sXbNlK9ZeSjiAQyN6lubTk8= Received: from AS4P251CA0024.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::16) by PRAP190MB1809.EURP190.PROD.OUTLOOK.COM (2603:10a6:102:290::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.21; Tue, 21 Jan 2025 17:08:37 +0000 Received: from AM2PEPF0001C70A.eurprd05.prod.outlook.com (2603:10a6:20b:5d3:cafe::a3) by AS4P251CA0024.outlook.office365.com (2603:10a6:20b:5d3::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8377.14 via Frontend Transport; Tue, 21 Jan 2025 17:08:37 +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:37 +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 Subject: [PATCH v1 21/31] net/ntnic: fix memory leak Date: Tue, 21 Jan 2025 18:07:59 +0100 Message-ID: <20250121170814.3252171-22-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_|PRAP190MB1809:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: b3481dc4-3cfc-466b-850c-08dd3a3e3eee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?DmLExhbXIEkF/8P0NWFCuPtOZhs2X/bxpHTieirG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xi4CmOCOqxmuD8inTY6NSqMBip4HsVpYNH1umpec?= =?us-ascii?Q?1voyKhl1Apn6qgioMPaJyBHfMa1D0lTY+yqLv8/m2yc3yost7MFQl9RCnHSD?= =?us-ascii?Q?oAblLDJS0P0TbsHpjjuJ+iVF5DHppR7DH5ebEV1qI12myE+/DFn/4MmVn1oh?= =?us-ascii?Q?pMfNSr3j2BPBIKIJ1EPyJCZH1HnxKfxHHE/W+LxJTGcA6ioNa62wOKx231EJ?= =?us-ascii?Q?Pz1vYeYD8VjPkNZJw6LfjqpU+1ONmK7YJBuuuAeMT9UcqxHqvxev0eZ/qEY0?= =?us-ascii?Q?GRFChI2pI7dllyxIfNwIttVV3ElOChQcEr5tc1HEsNNvVtzwM1pWC4ARcPuw?= =?us-ascii?Q?JN9KDzc6o8cMRGR02M9CzlXtmkt6cevE5o6C8d306u+I9mjNc5C0/jCNygrZ?= =?us-ascii?Q?xuU9wHCVARz2LZteTj6QDJZ4uH3B1YLKpq6/TICuXs0obqqTLIuhojWTNcru?= =?us-ascii?Q?IR6saeDW7Z7uBnSNgb1bm0d8H5n9Ky+L+pgImgLJbk7bOIUxMKDtgqVBEWT6?= =?us-ascii?Q?QuJJGZp52SKS+R1+eeC2YiU8rHn5nnhe8WVnn/Wtj/KR0lCWBXHRMWNnlAdP?= =?us-ascii?Q?g5fdkfBdIcxf6qM=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)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: RwfrQFLVB5Mg2m0UgimiAxDVjUC0FrQMCclZ+Q2Mm3hhb1NieAR2WUu4h57ExE8tN67zcI3RkHrHhlkG7SsGUGWbgq25cA32bVHYUOizQQb0us6DDrxOL7zkyGulAOSlti5543771ZWz1naiXnOHrltGcrMzBSVbp//rFC5tKhn6ZHpMdbH1QSLjf91sddaBUzAoUxzRfCjS3xqdvM1f+XVirQ+BpneYCiU+dVX7xxnOS79PVpsqj+KbQoB0mGnRSoIfCqiTeFDVd9h1D0gxlJDRsdyDWRg0/GlwMC+CeUu5z8C9qNyGlarVSirausObcrjsL1A/U3DBA9ThL6iX4nLnZZ9zXAUW+Dn9ZXdMOUWdtmx3OoW5+6oFu8x6ZCySgKwjWoeUcWnxn/oqcsea5Uixe8PqaVOLozXrYNVzOdnJSJp32v8Oal6DRptK5dv3DmKi0L2MpgjOFpLMTrDzskfEeMFNMaN+G93BnQPSu9y3CDFIFW/5AcxlOiQ2+uvD8QtO1j7mHyT3GTkPRZlIxgsfCfqfjMGMUksHnWSn4e3cKVexY89jEeYLAZzLTP1dTtr/pMlDx7FK3lSglOSfFX7uU+9G/9jHptD/O2ZcuKc1I/iaBFIoA0s7/lQcCbn1sXUecCdYhZi3E0VRam76Jw== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2025 17:08:37.3430 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b3481dc4-3cfc-466b-850c-08dd3a3e3eee 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: PRAP190MB1809 X-BESS-ID: 1737479319-310491-13351-7757-1 X-BESS-VER: 2019.1_20250117.1903 X-BESS-Apparent-Source-IP: 104.47.17.168 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVpam5kBGBlDMyCjVxNjY1Nw8KS 05OSnFwMjU3DgtLcXMKNHC2DTRIE2pNhYANE+BwkAAAAA= X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261957 [from cloudscan17-150.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=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 free for kvlist was added before return to avoid memory leak. Coveriry issue: 446751 Fixes: fe91ade9f5db ("net/ntnic: add basic queue operations") Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/ntnic_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c index 6fcbb8fa9b..d1360cc925 100644 --- a/drivers/net/ntnic/ntnic_ethdev.c +++ b/drivers/net/ntnic/ntnic_ethdev.c @@ -2089,6 +2089,7 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev) NT_LOG_DBGX(ERR, NTNIC, "problem with command line arguments: res=%d", res); + free(kvlist); return -1; } @@ -2112,6 +2113,7 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev) NT_LOG_DBGX(ERR, NTNIC, "problem with command line arguments: res=%d", res); + free(kvlist); return -1; } -- 2.45.0