Fix double free on error.

Found with:   Coverity Prevent(tm)
CID:          4573
This commit is contained in:
Alexander Motin 2010-06-05 08:36:37 +00:00
parent de29bf5e98
commit 81bfc0fc44
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208819

View File

@ -737,10 +737,8 @@ pmpdone(struct cam_periph *periph, union ccb *done_ccb)
if (xpt_create_path(&dpath, periph,
xpt_path_path_id(periph->path),
i, 0) != CAM_REQ_CMP) {
printf("pmpdone: xpt_create_path failed"
", bus scan halted\n");
xpt_free_ccb(done_ccb);
goto done;
printf("pmpdone: xpt_create_path failed\n");
continue;
}
/* If we did hard reset to this device, inform XPT. */
if ((softc->reset & softc->found & (1 << i)) != 0)