svn commit: r261450 - stable/10/sys/cam
Alexander Motin
mav at FreeBSD.org
Tue Feb 4 00:51:06 UTC 2014
Author: mav
Date: Tue Feb 4 00:51:06 2014
New Revision: 261450
URL: http://svnweb.freebsd.org/changeset/base/261450
Log:
MFC r260996:
Fix memory and references leak due to unfreed path in case we can't
allocate bus scan CCB.
Modified:
stable/10/sys/cam/cam_xpt.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/cam/cam_xpt.c
==============================================================================
--- stable/10/sys/cam/cam_xpt.c Tue Feb 4 00:00:01 2014 (r261449)
+++ stable/10/sys/cam/cam_xpt.c Tue Feb 4 00:51:06 2014 (r261450)
@@ -3917,9 +3917,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
More information about the svn-src-stable
mailing list