[PATCH] app/testpmd: fix memory leak in port flow configure
Dariusz Sosnowski
dsosnowski at nvidia.com
Tue Mar 24 09:44:21 CET 2026
> -----Original Message-----
> From: Shani Peretz <shperetz at nvidia.com>
> Sent: Tuesday, March 24, 2026 9:11 AM
> To: dev at dpdk.org
> Cc: Shani Peretz <shperetz at nvidia.com>; stable at dpdk.org; Aman Singh
> <aman.deep.singh at intel.com>; Dariusz Sosnowski
> <dsosnowski at nvidia.com>
> Subject: [PATCH] app/testpmd: fix memory leak in port flow configure
>
> 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")
> Cc: stable at dpdk.org
>
> Signed-off-by: Shani Peretz <shperetz at nvidia.com>
Reviewed-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Best regards,
Dariusz Sosnowski
More information about the dev
mailing list