提交 4a606ce6 编写于 作者: Z Zhang Changzhong 提交者: Tony Nguyen

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: 8b032a55 ("ice: low level support for tunnels")
Signed-off-by: NZhang Changzhong <zhangchangzhong@huawei.com>
Tested-by: NSujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
Reviewed-by: NLeon Romanovsky <leonro@nvidia.com>
上级 3f4870df
......@@ -5420,7 +5420,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
*/
status = ice_add_special_words(rinfo, lkup_exts, ice_is_dvm_ena(hw));
if (status)
goto err_free_lkup_exts;
goto err_unroll;
/* Group match words into recipes using preferred recipe grouping
* criteria.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册