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

From: Ioana Ciornei
Date: Tue Mar 01 2022 - 12:03:11 EST


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 <fufuyqqqqqq@xxxxxxxxx>
> Signed-off-by: Yongzhi Liu <lyz_cs@xxxxxxxxxx>

Reviewed-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>

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

Ioana