ring: fix minor memory free issue
PATCH 1/1 ring: fix minor memory free issue
Fix minor memory free issue in error clean-up.
Reported-by Coverity (CID 119258)
Signed-off-by John McNamara <[email protected]>
--- drivers/net/ring/rte_eth_ring.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/ring/rte_eth_ring.c +4 -2
@@ -363,8 +363,10 @@ rte_eth_from_rings(const char *name, struct rte_ring *const rx_queues[],return data->port_id; error: -rte_free (data->rx_queues); -rte_free (data->tx_queues); +if (data) { +rte_free (data->rx_queues); +rte_free (data->tx_queues); + }rte_free (data);rte_free (internals);
Signature · 1 line
1.8.1.4
PATCH v2 1/1 ring: fix minor memory free issue
Fix minor memory free issue in error clean-up.
Fixes 651c505af862 ("ring: enhance device setup from rings")
Reported-by Coverity (CID 119258)
Signed-off-by John McNamara <[email protected]>
---
V2:
* Add fixline.
drivers/net/ring/rte_eth_ring.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/ring/rte_eth_ring.c +5 -3
@@ -363,9 +363,11 @@ rte_eth_from_rings(const char *name, struct rte_ring *const rx_queues[],return data->port_id; error: -rte_free (data->rx_queues); -rte_free (data->tx_queues); -rte_free (data); +if (data) { +rte_free (data->rx_queues); +rte_free (data->tx_queues); +rte_free (data); + }rte_free (internals);return -1 ;
Signature · 1 line
1.8.1.4
Thomas Monjalon
Applied2015-11-06 17:28, John McNamara:
Quoted 5 lines
Fix minor memory free issue in error clean-up.
Reported-by Coverity (CID 119258)
Signed-off-by John McNamara <[email protected]>
Fixes 651c505af862 ("ring: enhance device setup from rings")
Applied, thanks