Date: Thu, 11 Feb 2016 11:53:32 +0000 (UTC) From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295511 - head/sys/dev/xen/netfront Message-ID: <201602111153.u1BBrWn0049957@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: royger Date: Thu Feb 11 11:53:32 2016 New Revision: 295511 URL: https://svnweb.freebsd.org/changeset/base/295511 Log: 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 Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Thu Feb 11 11:50:31 2016 (r295510) +++ head/sys/dev/xen/netfront/netfront.c Thu Feb 11 11:53:32 2016 (r295511) @@ -906,11 +906,9 @@ setup_txqs(device_t dev, struct netfront 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602111153.u1BBrWn0049957>