Date: Tue, 4 Feb 2014 00:52:08 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261451 - stable/9/sys/cam Message-ID: <201402040052.s140q8S4075407@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Tue Feb 4 00:52:08 2014 New Revision: 261451 URL: http://svnweb.freebsd.org/changeset/base/261451 Log: MFC r260996: Fix memory and references leak due to unfreed path in case we can't allocate bus scan CCB. Modified: stable/9/sys/cam/cam_xpt.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_xpt.c ============================================================================== --- stable/9/sys/cam/cam_xpt.c Tue Feb 4 00:51:06 2014 (r261450) +++ stable/9/sys/cam/cam_xpt.c Tue Feb 4 00:52:08 2014 (r261451) @@ -3982,9 +3982,11 @@ xpt_bus_register(struct cam_sim *sim, de scan_ccb->ccb_h.func_code = XPT_SCAN_BUS; scan_ccb->crcn.flags = 0; xpt_rescan(scan_ccb); - } else + } else { xpt_print(path, "Can't allocate CCB to scan bus\n"); + xpt_free_path(path); + } } else xpt_free_path(path); } else
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402040052.s140q8S4075407>