Fix for an issue where an error would cause a memory leak in the
ice_destroy_tunnel function.

Fixes: 8c518712ef9f ("net/ice/base: add vxlan/generic tunnel management")

Signed-off-by: Dan Nowlin <dan.now...@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell...@intel.com>
Signed-off-by: Leyi Rong <leyi.r...@intel.com>
---
 drivers/net/ice/base/ice_flex_pipe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_flex_pipe.c 
b/drivers/net/ice/base/ice_flex_pipe.c
index 41d45e3f2..974b43b22 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -1933,9 +1933,9 @@ enum ice_status ice_destroy_tunnel(struct ice_hw *hw, u16 
port, bool all)
                                hw->tnl.tbl[i].marked = false;
                        }
 
+ice_destroy_tunnel_err:
        ice_pkg_buf_free(hw, bld);
 
-ice_destroy_tunnel_err:
        return status;
 }
 
-- 
2.17.1

Reply via email to