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 F076543B86 for ; Tue, 5 Mar 2024 10:52:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E94BE410E7; Tue, 5 Mar 2024 10:52:01 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2083.outbound.protection.outlook.com [40.107.237.83]) by mails.dpdk.org (Postfix) with ESMTP id 88D584014F for ; Tue, 5 Mar 2024 10:52:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M5/6a8EMmZ3Orcg/7MOe3PbD3QL5SNBkS9bNEbAMDBsBReJBSSXALYKyNZRfdYQN1v9siiEDkR6rju/1vqSjNAiEBDqNqE9BGXMCJdCaI8AmFT+8YnNv17leAvga/0wmPpylRN8ljKN6j5QWJYJdJZCEluJq6V9aIuyvTFlHDBSmIDtOKrTDz0VLuoDz5nkf+I20zle9JsVYbw2zo5nrKuTUuNOLweq2erUF/VYNE9y3PbgFmu/6Y0JQOZwpzvsxFyaA2lPDpdh6cvYMD+5Dr9tdoDHxo2Ri9Frv5xJcaCKlwkZuZpmwZyAx0SKxZ9kBRvzirL6Gi9NkcIzivYqSmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=yl1ACcHmvHyPWYX7mAZNPXpfCkElRLathQUmw1PHaWI=; b=nxzhOAlpeL0cm773u0NkBsYb0RShRE+ZSHyb+xMcc69nAFnIXJE+x8SGgScDJ2WWFZ/4+hGCt8wfRvrpSBkbh8IXvOC+EfaTU5vmuv4qwWfyGJqstobD1X5hAdehFXVYft+dkVBEfaeLimTz4X/oiWqtv7HqU0G0GJzo6UtcP3XSPemGRW1gKrh/6NgvEuS9btq9gxCDe4Y3Bcjo4ZqYj5+thn8aZzwljDMNTndKbth71RsTDA1xIGkPLMpbgXzwFcBM27QUM+h+KmQUKaScPmT/2Cmbgy0hp5CUzGr4GWlIWmKRTLQqwn3Xaud1EdmOnzXfclLqB6K8SjVkR7lPXw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=huawei.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yl1ACcHmvHyPWYX7mAZNPXpfCkElRLathQUmw1PHaWI=; b=XRgbLyxneBPRGKiigD6U6sf1hGM4Em1RLe6kud3aT3szBaK/iWaXZBEtZvRS4av/NQiCExBsL1XgTXDfNWw8CX7N5K361aJJiTF9UeaJRHHji4fiu0bgUrVPpuwb555qUK3I4uKD0Zm0/ezZVk9Ub6pvj9JmNig1qN2XMvp+PfHRc+0QykrqOhfQwuWb1tKgqJ74UmZVycQ7afFg5glTrbdjgxjYmkmwPtfQpP9LdvhpGez7+3Lh9WCoQKDQ2/QW7iOTcLZ8GISM6Rmjq59ary2jABsn4J625c6W3BBTFO5LO5zYwS6PywiUuKxviWMWj2WbfGaVT7eihnFiiVWhbg== Received: from DS7PR05CA0086.namprd05.prod.outlook.com (2603:10b6:8:56::7) by SA0PR12MB4479.namprd12.prod.outlook.com (2603:10b6:806:95::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 09:51:58 +0000 Received: from CY4PEPF0000FCC4.namprd03.prod.outlook.com (2603:10b6:8:56:cafe::64) by DS7PR05CA0086.outlook.office365.com (2603:10b6:8:56::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.23 via Frontend Transport; Tue, 5 Mar 2024 09:51:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CY4PEPF0000FCC4.mail.protection.outlook.com (10.167.242.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:51:57 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 5 Mar 2024 01:51:46 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 5 Mar 2024 01:51:45 -0800 From: Xueming Li To: Chengwen Feng CC: dpdk stable Subject: patch 'examples/qos_sched: fix memory leak in args parsing' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:46:21 +0800 Message-ID: <20240305094757.439387-41-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC4:EE_|SA0PR12MB4479:EE_ X-MS-Office365-Filtering-Correlation-Id: f245d297-b71a-4c81-bda9-08dc3cf9e5db X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r1XeUUxMaKoGJc7biU7kWRyo6cgSPahrNsSNwgq4+ZDR42eHz4Tu+SPUCq3J+JEKRBRF/3gBddwsrSRYgKPL74qLbRtMPSVX6fbnjzD2D7cHQxqpkVknHIODakGPCqTdGvhgcek7jvcOIX0H0XCc0gaiWu1F4blfsy4RsuQ38c+ig4qFlyXfXDQhrzOlxC2qQmHQS/eP2ziCfa35FX6BFzRX0GD3vmLuJyhJFj32XSnCEVIaRrd6ye0reioMvevElEmW/2lp9oDM0khMCuDEApux1AoBFTl8FtqjSozATr3NUspdkAPOjRygvxILQK8lxJ+PZfDQSLXxiH2rkk+S4/jc4Wiy53ywOflS5m3rW7Ph0/mBmxoY1zfa1gyiISVJJD35UrkNlBZG4LLNWv6XmWNjUHDCSwKldLbgtt3rF5Mj+HriXQbN1yI4ZgrlZ+QlSmXFgK6Es7sQ8XMpubLwWcUq9O9NR8duJHQwWNnuWbTqu2VbS9XbKGpZSozkm0GIdtKg/O1xcqX/Qi09AyXr9wT6QlHsy+dO0jbSoWQUUMR3jnZOXP9H24q5L/PLUNxiK1QL3TmSVXK/sWuhVqMp1mjKXXMCyWtR/qWNfvHCzY40LbtORwgo66yD2g+caE3vt4tcCQjEvrF7ie5axEv3aHMXGZFnAXqFTzq3GAlKKiK2fLlPSzdDw8KgHZuDFQjpeMnR2T+uTk4F7RPIXUJ7o/wLrnVoFJvZF+MRhZehqiKsGdJFLzV5w19jX/tSesXx X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(82310400014)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:51:57.9268 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f245d297-b71a-4c81-bda9-08dc3cf9e5db X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC4.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4479 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=88f1c9af336f8fee966bd4b4b5f26e54ff809270 Thanks. Xueming Li --- >From 88f1c9af336f8fee966bd4b4b5f26e54ff809270 Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Fri, 10 Nov 2023 10:01:16 +0000 Subject: [PATCH] examples/qos_sched: fix memory leak in args parsing Cc: Xueming Li [ upstream commit db8aee153e43375538667c6f861e981a47574476 ] Should free the memory which allocated by strdup(). Fixes: 035b6a4f4bba ("examples/qos_sched: fix out-of-bounds option parsing") Signed-off-by: Chengwen Feng --- examples/qos_sched/args.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c index e97273152a..8d61d3e454 100644 --- a/examples/qos_sched/args.c +++ b/examples/qos_sched/args.c @@ -103,8 +103,10 @@ app_parse_opt_vals(const char *conf_str, char separator, uint32_t n_vals, uint32 n_tokens = rte_strsplit(string, strnlen(string, 32), tokens, n_vals, separator); - if (n_tokens > MAX_OPT_VALUES) + if (n_tokens > MAX_OPT_VALUES) { + free(string); return -1; + } for (i = 0; i < n_tokens; i++) opt_vals[i] = (uint32_t)atol(tokens[i]); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:32.248213842 +0800 +++ 0040-examples-qos_sched-fix-memory-leak-in-args-parsing.patch 2024-03-05 17:39:30.733566492 +0800 @@ -1 +1 @@ -From db8aee153e43375538667c6f861e981a47574476 Mon Sep 17 00:00:00 2001 +From 88f1c9af336f8fee966bd4b4b5f26e54ff809270 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit db8aee153e43375538667c6f861e981a47574476 ] @@ -9 +11,0 @@ -Cc: stable@dpdk.org