diff options
author | 2015-02-05 11:00:42 +0300 | |
---|---|---|
committer | 2015-02-06 12:50:12 -0800 | |
commit | 37c85c3498c5538db050ff287e346127dbc16f7c (patch) | |
tree | 8c1bbc4e4009c703b1cf7a1a8d6fa0cec59df007 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | ARCNET: Add missing error check for devm_kzalloc (diff) | |
download | wireguard-linux-37c85c3498c5538db050ff287e346127dbc16f7c.tar.xz wireguard-linux-37c85c3498c5538db050ff287e346127dbc16f7c.zip |
net: sxgbe: fix error handling in init_rx_ring()
There are a couple bugs with the error handling in this function.
1) If we can't allocate "rx_ring->rx_skbuff" then we should call
dma_free_coherent() but we don't.
2) free_rx_ring() frees "rx_ring->rx_skbuff_dma" and "rx_ring->rx_skbuff"
so calling it in a loop causes a double free.
Also it was a bit confusing how we sometimes freed things before doing
the goto. I've cleaned it up so it does error handling in normal kernel
style.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions