1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Revert r282227. It is clearly incorrect as it frees an object that is still

referenced.  I think that there does exist an unlikely edge case for a
memory leak, but only if a driver is incorrectly written and specifies no
valid range of targets to scan.  That can be fixed in a follow-up commit.

Obtained from:	Netflix, Inc.
This commit is contained in:
Scott Long 2015-04-29 17:18:41 +00:00
parent 82224d7df8
commit 16be867406
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=282239

View File

@ -2008,7 +2008,6 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb)
" with status %#x, bus scan halted\n",
status);
free(scan_info, M_CAMXPT);
scan_info = NULL;
request_ccb->ccb_h.status = status;
xpt_free_ccb(work_ccb);
xpt_done(request_ccb);
@ -2018,7 +2017,6 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb)
if (work_ccb == NULL) {
xpt_free_ccb((union ccb *)scan_info->cpi);
free(scan_info, M_CAMXPT);
scan_info = NULL;
xpt_free_path(path);
request_ccb->ccb_h.status = CAM_RESRC_UNAVAIL;
xpt_done(request_ccb);
@ -2034,7 +2032,6 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb)
xpt_action(work_ccb);
}
free(scan_info, M_CAMXPT);
mtx_lock(mtx);
break;
}