xen-netfront: rearrange error paths in setup_txqs
Coverity spotted double free errors in error path. Fix that by removing the extraneous calls. Coverity ID: 1349798 Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Sponsored by: Citrix Systems R&D Differential revision: https://reviews.freebsd.org/D5251
This commit is contained in:
parent
7803499440
commit
d4dae2b1fb
@ -906,11 +906,9 @@ setup_txqs(device_t dev, struct netfront_info *info,
|
||||
fail_bind_port:
|
||||
taskqueue_drain_all(txq->tq);
|
||||
fail_start_thread:
|
||||
gnttab_free_grant_references(txq->gref_head);
|
||||
free(txq->ring.sring, M_DEVBUF);
|
||||
gnttab_end_foreign_access_ref(txq->ring_ref);
|
||||
buf_ring_free(txq->br, M_DEVBUF);
|
||||
taskqueue_free(txq->tq);
|
||||
gnttab_end_foreign_access_ref(txq->ring_ref);
|
||||
fail_grant_ring:
|
||||
gnttab_free_grant_references(txq->gref_head);
|
||||
free(txq->ring.sring, M_DEVBUF);
|
||||
|
Loading…
Reference in New Issue
Block a user