{
uint8_t i;
- for (i = 0; i < dev->data->nb_rx_queues; i++) {
- rte_free(dev->data->rx_queues[i]);
- dev->data->rx_queues[i] = NULL;
+ if (dev->data->rx_queues != NULL) {
+ for (i = 0; i < dev->data->nb_rx_queues; i++) {
+ rte_free(dev->data->rx_queues[i]);
+ dev->data->rx_queues[i] = NULL;
+ }
+ dev->data->nb_rx_queues = 0;
}
- dev->data->nb_rx_queues = 0;
- for (i = 0; i < dev->data->nb_tx_queues; i++) {
- rte_free(dev->data->tx_queues[i]);
- dev->data->tx_queues[i] = NULL;
+ if (dev->data->tx_queues != NULL) {
+ for (i = 0; i < dev->data->nb_tx_queues; i++) {
+ rte_free(dev->data->tx_queues[i]);
+ dev->data->tx_queues[i] = NULL;
+ }
+ dev->data->nb_tx_queues = 0;
}
- dev->data->nb_tx_queues = 0;
}
void