[dpdk-dev] [PATCH v4] net/softnic: fix memory leak in parsing arguments

Singh, Jasvinder jasvinder.singh at intel.com
Fri Jul 16 14:04:36 CEST 2021



> -----Original Message-----
> From: Yu, DapengX <dapengx.yu at intel.com>
> Sent: Thursday, July 15, 2021 6:38 AM
> To: Singh, Jasvinder <jasvinder.singh at intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu at intel.com>
> Cc: dev at dpdk.org; Yu, DapengX <dapengx.yu at intel.com>; stable at dpdk.org
> Subject: [PATCH v4] net/softnic: fix memory leak in parsing arguments
> 
> From: Dapeng Yu <dapengx.yu at intel.com>
> 
> In function pmd_parse_args(), firmware path is duplicated from device
> arguments as character string, but is never freed, which cause memory leak.
> 
> This patch changes the type of firmware member of struct pmd_params to
> character array, to make memory resource release unnecessary, and
> changes the type of name member to character array, to keep the
> consistency of character string handling in struct pmd_params.
> 
> Fixes: 7e68bc20f8c8 ("net/softnic: restructure")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Dapeng Yu <dapengx.yu at intel.com>
> ---

Acked-by: Jasvinder Singh <jasvinder.singh at intel.com>


More information about the dev mailing list