]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: fix memory leak on ipsec allocation
authorColin Ian King <colin.king@canonical.com>
Wed, 9 May 2018 13:58:48 +0000 (14:58 +0100)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 11 May 2018 19:22:22 +0000 (12:22 -0700)
commit6107d72cf00f7495f3beabedbf3b9524be0e8dc7
treeb0d6be773af1ce70ea68ff33b655dceea60e976f
parent7fdb770aa7f1e18cada9f531b4a14fdef7e8518d
ixgbe: fix memory leak on ipsec allocation

The error clean up path kfree's adapter->ipsec and should be
instead kfree'ing ipsec. Fix this.  Also, the err1 error exit path
does not need to kfree ipsec because this failure path was for
the failed allocation of ipsec.

Detected by CoverityScan, CID#146424 ("Resource Leak")

Fixes: acd53c391600 ("ixgbe: add ipsec offload add and remove SA")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Shannon Nelson <shannon.nelson@oracle.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c