ring: fix memory freeing on error
Fix minor memory free issue in error clean-up. Reported-by Coverity (CID 119258) Fixes: 651c505af862 ("ring: enhance device setup from rings") Signed-off-by: John McNamara <john.mcnamara@intel.com>
This commit is contained in:
parent
f03924c32e
commit
4c28fb7685
@ -363,8 +363,10 @@ rte_eth_from_rings(const char *name, struct rte_ring *const rx_queues[],
|
|||||||
return data->port_id;
|
return data->port_id;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
rte_free(data->rx_queues);
|
if (data) {
|
||||||
rte_free(data->tx_queues);
|
rte_free(data->rx_queues);
|
||||||
|
rte_free(data->tx_queues);
|
||||||
|
}
|
||||||
rte_free(data);
|
rte_free(data);
|
||||||
rte_free(internals);
|
rte_free(internals);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user