Fix misallocation error in target mode.

MFC after:	1 day
This commit is contained in:
Matt Jacob 2010-02-27 01:58:41 +00:00
parent 0a431e0795
commit 32b3ec7df1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204384

View file

@ -1529,7 +1529,7 @@ isp_pci_mbxdma(ispsoftc_t *isp)
}
isp->isp_xffree = isp->isp_xflist;
#ifdef ISP_TARGET_MODE
len = sizeof (isp_hdl_t *) * isp->isp_maxcmds;
len = sizeof (isp_hdl_t) * isp->isp_maxcmds;
isp->isp_tgtlist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
if (isp->isp_tgtlist == NULL) {
free(isp->isp_osinfo.pcmd_pool, M_DEVBUF);