mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-09 02:26:27 +00:00
Fix possible use after free.
Found with: Coverity Prevent(tm) CID: 4634
This commit is contained in:
parent
9fa5f90fbf
commit
20b964467e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208822
@ -868,11 +868,11 @@ free_hcb(struct atapi_hcb *hcb)
|
||||
static void
|
||||
free_softc(struct atapi_xpt_softc *scp)
|
||||
{
|
||||
struct atapi_hcb *hcb;
|
||||
struct atapi_hcb *hcb, *thcb;
|
||||
|
||||
if (scp != NULL) {
|
||||
mtx_lock(&scp->state_lock);
|
||||
TAILQ_FOREACH(hcb, &scp->pending_hcbs, chain) {
|
||||
TAILQ_FOREACH_SAFE(hcb, &scp->pending_hcbs, chain, thcb) {
|
||||
free_hcb_and_ccb_done(hcb, CAM_UNREC_HBA_ERROR);
|
||||
}
|
||||
if (scp->path != NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user