/* This function frees the memory allocated to the q_vectors. In addition if NAPI is enabled it will delete any references to the NAPI struct prior to freeing the q_vector.  */
static void igb_free_q_vectors(struct igb_adapter *adapter)
/* This function frees the memory allocated to the q_vectors. In addition if NAPI is enabled it will delete any references to the NAPI struct prior to freeing the q_vector.  */
static void igb_free_q_vectors(struct igb_adapter *adapter)
{
	int v_idx;
	for (v_idx = 0; v_idx < adapter->num_q_vectors; v_idx++) {
		struct igb_q_vector *q_vector = adapter->q_vector[v_idx];
		adapter->q_vector[v_idx] = NULL;
		netif_napi_del(&q_vector->napi);
		kfree(q_vector);
	}
	adapter->num_q_vectors = 0;
}