patch 'app/testpmd: fix memory leak in port flow configure' has been queued to stable release 23.11.7

Shani Peretz shperetz at nvidia.com
Wed Apr 15 12:00:03 CEST 2026


Hi,

FYI, your patch has been queued to stable release 23.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/19/26. 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://github.com/shanipr/dpdk-stable

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/e3cdb2f306dc73e85018fb7c62faddcc9efe78e9

Thanks.

Shani

---
>From e3cdb2f306dc73e85018fb7c62faddcc9efe78e9 Mon Sep 17 00:00:00 2001
From: Shani Peretz <shperetz at nvidia.com>
Date: Tue, 24 Mar 2026 10:10:44 +0200
Subject: [PATCH] app/testpmd: fix memory leak in port flow configure

[ upstream commit 7fadc803958843ced984faaa4ca2a75b5d3c1d4f ]

When "flow configure" is issued multiple times on the same port,
port_flow_configure() allocates a new job_list via calloc() without
freeing the previous allocation, leaking it. The old pointer is
simply overwritten.

  testpmd> flow configure 0 queues_number 10 queues_size 256 ...
  testpmd> flow configure 0 queues_number 10 queues_size 256 ...

The patch fixes this by freeing the existing job_list before allocating
the replacement.

Fixes: df503d757b36 ("app/testpmd: fix flow queue job leaks")

Signed-off-by: Shani Peretz <shperetz at nvidia.com>
Reviewed-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
 app/test-pmd/config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 07036c30f0..4e4638f5b3 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1746,6 +1746,7 @@ port_flow_configure(portid_t port_id,
 	port->queue_sz = queue_attr->size;
 	for (std_queue = 0; std_queue < nb_queue; std_queue++)
 		attr_list[std_queue] = queue_attr;
+	free(port->job_list);
 	port->job_list = calloc(nb_queue, sizeof(*port->job_list));
 	if (port->job_list == NULL) {
 		TESTPMD_LOG(ERR, "Failed to allocate memory for operations tracking on port %u\n",
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-04-14 14:44:34.686341948 +0300
+++ 0062-app-testpmd-fix-memory-leak-in-port-flow-configure.patch	2026-04-14 14:44:28.702591000 +0300
@@ -1 +1 @@
-From 7fadc803958843ced984faaa4ca2a75b5d3c1d4f Mon Sep 17 00:00:00 2001
+From e3cdb2f306dc73e85018fb7c62faddcc9efe78e9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7fadc803958843ced984faaa4ca2a75b5d3c1d4f ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index 052e8b7c24..32c885de0b 100644
+index 07036c30f0..4e4638f5b3 100644
@@ -30 +31 @@
-@@ -1836,6 +1836,7 @@ port_flow_configure(portid_t port_id,
+@@ -1746,6 +1746,7 @@ port_flow_configure(portid_t port_id,


More information about the stable mailing list