[Intel-wired-lan] [next PATCH S40 11/13] i40e: fix memory leak
Bimmy Pujari
bimmy.pujari at intel.com
Mon Jul 25 23:15:53 UTC 2016
From: Mitch Williams <mitch.a.williams at intel.com>
When we allocate memory, we must free it. It's simple courtesy.
Signed-off-by: Mitch Williams <mitch.a.williams at intel.com>
Change-ID: Id007294096fb53344f1a8b9a0f78eddf9853c5d6
---
Testing Hints : Found by inspection. The VF driver
doesn't currently call this function, so not testable.
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 5ea659c..68e3482 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -2318,6 +2318,7 @@ err:
/* send the response back to the VF */
aq_ret = i40e_vc_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_GET_RSS_HENA_CAPS,
aq_ret, (u8 *)vrh, len);
+ kfree(vrh);
return aq_ret;
}
--
2.4.11
More information about the Intel-wired-lan
mailing list