[v2,63/66] net/ice/base: fix potential memory leak in destroy tunnel

Message ID 20190611155221.2703-64-leyi.rong@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series shared code update |

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Leyi Rong June 11, 2019, 3:52 p.m. UTC
  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.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
---
 drivers/net/ice/base/ice_flex_pipe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

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;
 }