i40e: fix memory leak
authorMitch Williams <mitch.a.williams@intel.com>
Wed, 27 Jul 2016 19:02:39 +0000 (12:02 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 18 Aug 2016 18:43:13 +0000 (11:43 -0700)
When we allocate memory, we must free it. It's simple courtesy.

Change-ID: Id007294096fb53344f1a8b9a0f78eddf9853c5d6
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

index 5ea659c7bab718de4daa5bf26ad0be865a8d7ef8..68e3482b3b2bf90b5f424d99f5875df4073d2e42 100644 (file)
@@ -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;
 }