Fix a small memory leak in mpssas_get_sata_identify(). The change has been

submitted upstream as well.

Reviewed by:	ken, scottl
Obtained from:	DragonFly BSD (change df8658e030226dd015cff9749452666d8fe1e87b)
MFC after:	5 days
This commit is contained in:
Christian Brueffer 2012-07-18 09:06:07 +00:00
parent 3c73180f55
commit 1d50dd1f08

View File

@ -796,8 +796,10 @@ mpssas_get_sata_identify(struct mps_softc *sc, u16 handle,
if (!buffer)
return ENOMEM;
if ((cm = mps_alloc_command(sc)) == NULL)
if ((cm = mps_alloc_command(sc)) == NULL) {
free(buffer, M_MPT2);
return (EBUSY);
}
mpi_request = (MPI2_SATA_PASSTHROUGH_REQUEST *)cm->cm_req;
bzero(mpi_request,sizeof(MPI2_SATA_PASSTHROUGH_REQUEST));
mpi_request->Function = MPI2_FUNCTION_SATA_PASSTHROUGH;