summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAnjali Singhai <anjali.singhai@intel.com>2015-08-24 23:26:53 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-10-04 05:09:50 +0300
commit126b63d9d3aa99a90381ed168a885989dd33cf15 (patch)
treef494597ac249788baac7aef2d971c9f08bace46e /drivers
parent27ca2753500537b8f3f3aba43558d68e2e8439a1 (diff)
downloadlinux-126b63d9d3aa99a90381ed168a885989dd33cf15.tar.xz
i40e: Fix a memory leak in X722 rss config path
In any case free the memory allocated before exiting. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 4345fc58dc00..5646ee885db2 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7625,7 +7625,7 @@ static int i40e_config_rss_aq(struct i40e_vsi *vsi, const u8 *seed)
"Cannot set RSS key, err %s aq_err %s\n",
i40e_stat_str(&pf->hw, ret),
i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
- return ret;
+ goto config_rss_aq_out;
}
if (vsi->type == I40E_VSI_MAIN)
@@ -7639,6 +7639,8 @@ static int i40e_config_rss_aq(struct i40e_vsi *vsi, const u8 *seed)
i40e_stat_str(&pf->hw, ret),
i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
+config_rss_aq_out:
+ kfree(rss_lut);
return ret;
}