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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 26 13:57:36 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.5

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/28/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/bluca/dpdk-stable

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

Thanks.

Luca Boccassi

---
>From a91ac426ec6817ba49351fb5966f50bd124da8c6 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 af07314717..2b573bb17b 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1815,6 +1815,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.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-26 12:56:33.536344405 +0000
+++ 0002-app-testpmd-fix-memory-leak-in-port-flow-configure.patch	2026-03-26 12:56:33.397542839 +0000
@@ -1 +1 @@
-From 7fadc803958843ced984faaa4ca2a75b5d3c1d4f Mon Sep 17 00:00:00 2001
+From a91ac426ec6817ba49351fb5966f50bd124da8c6 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 af07314717..2b573bb17b 100644
@@ -30 +31 @@
-@@ -1836,6 +1836,7 @@ port_flow_configure(portid_t port_id,
+@@ -1815,6 +1815,7 @@ port_flow_configure(portid_t port_id,


More information about the stable mailing list