don't leak pdata. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4
This commit is contained in:
parent
abd5e6dfc6
commit
14b12a4800
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: aic7xxx.c,v 1.131 2014/03/27 18:28:26 christos Exp $ */
|
/* $NetBSD: aic7xxx.c,v 1.132 2015/02/07 04:27:54 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Core routines and tables shareable across OS platforms.
|
* Core routines and tables shareable across OS platforms.
|
||||||
@ -39,7 +39,7 @@
|
|||||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGES.
|
* POSSIBILITY OF SUCH DAMAGES.
|
||||||
*
|
*
|
||||||
* $Id: aic7xxx.c,v 1.131 2014/03/27 18:28:26 christos Exp $
|
* $Id: aic7xxx.c,v 1.132 2015/02/07 04:27:54 christos Exp $
|
||||||
*
|
*
|
||||||
* //depot/aic7xxx/aic7xxx/aic7xxx.c#112 $
|
* //depot/aic7xxx/aic7xxx/aic7xxx.c#112 $
|
||||||
*
|
*
|
||||||
@ -50,7 +50,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.131 2014/03/27 18:28:26 christos Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.132 2015/02/07 04:27:54 christos Exp $");
|
||||||
|
|
||||||
#include <dev/ic/aic7xxx_osm.h>
|
#include <dev/ic/aic7xxx_osm.h>
|
||||||
#include <dev/ic/aic7xxx_inline.h>
|
#include <dev/ic/aic7xxx_inline.h>
|
||||||
@ -4372,8 +4372,10 @@ ahc_alloc_scbs(struct ahc_softc *ahc)
|
|||||||
AHC_MAXTRANSFER_SIZE, AHC_NSEG, MAXPHYS, 0,
|
AHC_MAXTRANSFER_SIZE, AHC_NSEG, MAXPHYS, 0,
|
||||||
BUS_DMA_WAITOK|BUS_DMA_ALLOCNOW|ahc->sc_dmaflags,
|
BUS_DMA_WAITOK|BUS_DMA_ALLOCNOW|ahc->sc_dmaflags,
|
||||||
&next_scb->dmamap);
|
&next_scb->dmamap);
|
||||||
if (error != 0)
|
if (error != 0) {
|
||||||
|
free(pdata, M_DEVBUF);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
next_scb->hscb = &scb_data->hscbs[scb_data->numscbs];
|
next_scb->hscb = &scb_data->hscbs[scb_data->numscbs];
|
||||||
next_scb->hscb->tag = ahc->scb_data->numscbs;
|
next_scb->hscb->tag = ahc->scb_data->numscbs;
|
||||||
|
Loading…
Reference in New Issue
Block a user