forked from Minki/linux
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: 63a67fe229
("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>
This commit is contained in:
parent
cf12aab67a
commit
c89ebb968f
@ -943,8 +943,8 @@ err2:
|
||||
kfree(ipsec->ip_tbl);
|
||||
kfree(ipsec->rx_tbl);
|
||||
kfree(ipsec->tx_tbl);
|
||||
kfree(ipsec);
|
||||
err1:
|
||||
kfree(adapter->ipsec);
|
||||
netdev_err(adapter->netdev, "Unable to allocate memory for SA tables");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user