Re: [PATCH net] ice: switch: fix potential memleak in ice_add_adv_recipe()

From: Leon Romanovsky
Date: Mon Dec 05 2022 - 03:20:24 EST


On Mon, Dec 05, 2022 at 03:38:22PM +0800, Zhang Changzhong wrote:
> When ice_add_special_words() fails, the 'rm' is not released, which will
> lead to a memory leak. Fix this up by going to 'err_unroll' label.
>
> Compile tested only.
>
> Fixes: 8b032a55c1bd ("ice: low level support for tunnels")
> Signed-off-by: Zhang Changzhong <zhangchangzhong@xxxxxxxxxx>
> ---
> drivers/net/ethernet/intel/ice/ice_switch.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>