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

From: Jiri Pirko
Date: Tue Dec 06 2022 - 08:28:07 EST


Mon, Dec 05, 2022 at 08:38:22AM CET, zhangchangzhong@xxxxxxxxxx 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>

Reviewed-by: Jiri Pirko <jiri@xxxxxxxxxx>