mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-27 16:39:08 +00:00
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:
parent
3c73180f55
commit
1d50dd1f08
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=238574
@ -796,8 +796,10 @@ mpssas_get_sata_identify(struct mps_softc *sc, u16 handle,
|
|||||||
if (!buffer)
|
if (!buffer)
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
|
|
||||||
if ((cm = mps_alloc_command(sc)) == NULL)
|
if ((cm = mps_alloc_command(sc)) == NULL) {
|
||||||
|
free(buffer, M_MPT2);
|
||||||
return (EBUSY);
|
return (EBUSY);
|
||||||
|
}
|
||||||
mpi_request = (MPI2_SATA_PASSTHROUGH_REQUEST *)cm->cm_req;
|
mpi_request = (MPI2_SATA_PASSTHROUGH_REQUEST *)cm->cm_req;
|
||||||
bzero(mpi_request,sizeof(MPI2_SATA_PASSTHROUGH_REQUEST));
|
bzero(mpi_request,sizeof(MPI2_SATA_PASSTHROUGH_REQUEST));
|
||||||
mpi_request->Function = MPI2_FUNCTION_SATA_PASSTHROUGH;
|
mpi_request->Function = MPI2_FUNCTION_SATA_PASSTHROUGH;
|
||||||
|
Loading…
Reference in New Issue
Block a user