Message ID | 20221206102959.20255-1-yuancan@huawei.com |
---|---|
State | Superseded |
Headers | show |
Series | [net,v2] intel/i40e: Fix potential memory leak in i40e_init_recovery_mode() | expand |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index b5dcd15ced36..d23081c224d6 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -15536,6 +15536,7 @@ static int i40e_init_recovery_mode(struct i40e_pf *pf, struct i40e_hw *hw) pci_disable_pcie_error_reporting(pf->pdev); pci_release_mem_regions(pf->pdev); pci_disable_device(pf->pdev); + kfree(pf->vsi); kfree(pf); return err;