forked from luck/tmp_suning_uos_patched
i40e: Fix memory leak in i40e_probe
[ Upstream commit 58cab46c622d6324e47bd1c533693c94498e4172 ] Struct i40e_veb is allocated in function i40e_setup_pf_switch, and stored to an array field veb inside struct i40e_pf. However when i40e_setup_misc_vector fails, this memory leaks. Fix this by calling exit and teardown functions. Signed-off-by: Keita Suzuki <keitasuzuki.park@sslab.ics.keio.ac.jp> Tested-by: Tony Brelinski <tonyx.brelinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
6d4fabc6c7
commit
6c73bc9f28
|
@ -15100,6 +15100,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
if (err) {
|
||||
dev_info(&pdev->dev,
|
||||
"setup of misc vector failed: %d\n", err);
|
||||
i40e_cloud_filter_exit(pf);
|
||||
i40e_fdir_teardown(pf);
|
||||
goto err_vsis;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user