svn commit: r198713 - in stable/7/sys: . cam/scsi contrib/pf
Christian Brueffer
brueffer at FreeBSD.org
Sat Oct 31 11:23:54 UTC 2009
Author: brueffer
Date: Sat Oct 31 11:23:54 2009
New Revision: 198713
URL: http://svn.freebsd.org/changeset/base/198713
Log:
MFC: 198356
Fix a memory leak in an error case.
Modified:
stable/7/sys/ (props changed)
stable/7/sys/cam/scsi/scsi_low.c
stable/7/sys/contrib/pf/ (props changed)
Modified: stable/7/sys/cam/scsi/scsi_low.c
==============================================================================
--- stable/7/sys/cam/scsi/scsi_low.c Sat Oct 31 11:21:45 2009 (r198712)
+++ stable/7/sys/cam/scsi/scsi_low.c Sat Oct 31 11:23:54 2009 (r198713)
@@ -638,7 +638,10 @@ scsi_low_attach_xs(slp)
return ENOMEM;
splp = SCSI_LOW_MALLOC(sizeof(*splp));
if (splp == NULL)
+ {
+ SCSI_LOW_FREE(sap);
return ENOMEM;
+ }
SCSI_LOW_BZERO(sap, sizeof(*sap));
SCSI_LOW_BZERO(splp, sizeof(*splp));
More information about the svn-src-stable-7
mailing list