Date: Tue, 21 Jan 2014 23:15:24 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260996 - head/sys/cam Message-ID: <201401212315.s0LNFOEX010293@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Tue Jan 21 23:15:23 2014 New Revision: 260996 URL: http://svnweb.freebsd.org/changeset/base/260996 Log: Fix memory and references leak due to unfreed path in case we can't allocate bus scan CCB. MFC after: 2 weeks Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Tue Jan 21 21:30:44 2014 (r260995) +++ head/sys/cam/cam_xpt.c Tue Jan 21 23:15:23 2014 (r260996) @@ -3919,9 +3919,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?201401212315.s0LNFOEX010293>