On Mon, 2022-07-18 at 13:53 +0530, Shivaprasad G Bhat wrote:
> The local variable 'path' is not freed in cxl_port_init() for success
> case.
> The patch fixes that.
> 
> Signed-off-by: Shivaprasad G Bhat <sb...@linux.ibm.com>
> ---
>  cxl/lib/libcxl.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/cxl/lib/libcxl.c b/cxl/lib/libcxl.c
> index be6bc2c..e52896f 100644
> --- a/cxl/lib/libcxl.c
> +++ b/cxl/lib/libcxl.c
> @@ -770,6 +770,7 @@ static int cxl_port_init(struct cxl_port *port,
> struct cxl_port *parent_port,
>         if (sysfs_read_attr(ctx, path, buf) == 0)
>                 port->module = util_modalias_to_module(ctx, buf);
>  
> +       free(path);
>         return 0;
>  err:
>         free(port->dev_path);
> 
> 

Thanks, applied.
Just a quick note to CC linux-...@vger.kernel.org for CXL related
patches, and use "ndctl PATCH" as the subject prefix.

Reply via email to