Skip to content

Commit 4a606ce

Browse files
Zhang Changzhonganguy11
authored andcommitted
ice: switch: fix potential memleak in ice_add_adv_recipe()
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: 8b032a5 ("ice: low level support for tunnels") Signed-off-by: Zhang Changzhong <[email protected]> Tested-by: Sujai Buvaneswaran <[email protected]> Signed-off-by: Tony Nguyen <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]>
1 parent 3f4870d commit 4a606ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/ice/ice_switch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5420,7 +5420,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
54205420
*/
54215421
status = ice_add_special_words(rinfo, lkup_exts, ice_is_dvm_ena(hw));
54225422
if (status)
5423-
goto err_free_lkup_exts;
5423+
goto err_unroll;
54245424

54255425
/* Group match words into recipes using preferred recipe grouping
54265426
* criteria.

0 commit comments

Comments
 (0)