Date: Sun, 14 Jun 2009 12:02:21 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 164329 for review Message-ID: <200906141202.n5EC2LO1001118@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=164329 Change 164329 by mav@mav_mavbook on 2009/06/14 12:01:41 Plug paths leak on bus scan. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#20 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#20 (text+ko) ==== @@ -1213,13 +1213,12 @@ work_ccb = request_ccb; /* Reuse the same CCB to query if a device was really found */ scan_info = (ata_scan_bus_info *)work_ccb->ccb_h.ppriv_ptr0; - - /* - * Free the current request path- we're done with it. - */ + /* Free the current request path- we're done with it. */ xpt_free_path(work_ccb->ccb_h.path); + /* If there is PM... */ if (scan_info->counter == 15 && work_ccb->ccb_h.ppriv_field1 != 0) { + /* Save PM probe result. */ scan_info->found = work_ccb->ccb_h.ppriv_field1; /* Report SIM that PM is present. */ bzero(&cts, sizeof(cts)); @@ -1260,6 +1259,7 @@ } if ((scan_info->found & (1 << scan_info->counter)) == 0) { xpt_async(AC_LOST_DEVICE, path, NULL); + xpt_free_path(path); goto take_next; } xpt_setup_ccb(&work_ccb->ccb_h, path,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906141202.n5EC2LO1001118>