2022-03-01 17:30:13

by Ioana Ciornei

[permalink] [raw]
Subject: Re: [PATCH v1] dpaa2-switch: fix memory leak of dpaa2_switch_acl_entry_add

On Tue, Mar 01, 2022 at 10:15:44PM +0800, Yeqi Fu wrote:
> The error handling branch did not properly free the memory of cmd_buf
> before return, which would cause memory leak. So fix this by adding
> kfree to the error handling branch.
>
> Fixes: 1110318d83e8 ("dpaa2-switch: add tc flower hardware offload on ingress traffic")
> Signed-off-by: Yeqi Fu <[email protected]>
> Signed-off-by: Yongzhi Liu <[email protected]>

Reviewed-by: Ioana Ciornei <[email protected]>

Just as a note, this should have been [PATCH v2] and not v1.

Ioana