Fix a memory leak in an error case.

PR:		138376
Submitted by:	Patroklos Argyroudis <argp@census-labs.com>
Reviewed by:	scottl
MFC after:	1 week
This commit is contained in:
Christian Brueffer 2009-10-22 06:13:07 +00:00
parent fc02477e1c
commit e6fa23b0da

View file

@ -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));