From: Mitch Williams Date: Wed, 27 Jul 2016 19:02:39 +0000 (-0700) Subject: i40e: fix memory leak X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=b7d2cd951f7147f979d9e82773246416dcef2e3e;p=deliverable%2Flinux.git i40e: fix memory leak When we allocate memory, we must free it. It's simple courtesy. Change-ID: Id007294096fb53344f1a8b9a0f78eddf9853c5d6 Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 5ea659c7bab7..68e3482b3b2b 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; }