Author: delphij Date: Tue Jun 3 21:31:28 2014 New Revision: 267030 URL: http://svnweb.freebsd.org/changeset/base/267030
Log: Don't leak Giant. Noticed by: Sascha Wildner (DragonFlyBSD) via IRC Reviewed by: mav MFC after: 3 days Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Tue Jun 3 21:06:03 2014 (r267029) +++ head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Tue Jun 3 21:31:28 2014 (r267030) @@ -1345,17 +1345,19 @@ static int hpt_rescan_bus(void) ldm_for_each_vbus(vbus, vbus_ext) { if ((ccb = xpt_alloc_ccb()) == NULL) { + mtx_unlock(&Giant); return(ENOMEM); } if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(vbus_ext->sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { xpt_free_ccb(ccb); + mtx_unlock(&Giant); return(EIO); } xpt_rescan(ccb); } mtx_unlock(&Giant); - return(0); + return(0); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"