MFC of 204384: Fix misallocation error in target mode

This commit is contained in:
Matt Jacob 2010-02-28 06:07:53 +00:00
parent 84a85a0662
commit c5fc7d9644
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/8/; revision=204442

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);