avoid null ptr deref
Noticed by: Coverity Prevent analysis tool Reviewed by: scottl
This commit is contained in:
parent
fa6fc5b819
commit
72046dcea3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142515
@ -700,10 +700,11 @@ static m_addr_t ___dma_getp(m_pool_s *mp)
|
||||
bus_dmamap_unload(mp->dmat, vbp->dmamap);
|
||||
if (vaddr)
|
||||
bus_dmamem_free(mp->dmat, vaddr, vbp->dmamap);
|
||||
if (vbp->dmamap)
|
||||
bus_dmamap_destroy(mp->dmat, vbp->dmamap);
|
||||
if (vbp)
|
||||
if (vbp) {
|
||||
if (vbp->dmamap)
|
||||
bus_dmamap_destroy(mp->dmat, vbp->dmamap);
|
||||
__sym_mfree(&mp0, vbp, sizeof(*vbp), "VTOB");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user