git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f03924c
)
ring: fix memory freeing on error
author
John McNamara
<john.mcnamara@intel.com>
Fri, 6 Nov 2015 17:28:37 +0000
(17:28 +0000)
committer
Thomas Monjalon
<thomas.monjalon@6wind.com>
Fri, 6 Nov 2015 23:08:36 +0000
(
00:08
+0100)
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>
drivers/net/ring/rte_eth_ring.c
patch
|
blob
|
history
diff --git
a/drivers/net/ring/rte_eth_ring.c
b/drivers/net/ring/rte_eth_ring.c
index
cc60008
..
9a31bce
100644
(file)
--- a/
drivers/net/ring/rte_eth_ring.c
+++ b/
drivers/net/ring/rte_eth_ring.c
@@
-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);