svn commit: r238574 - head/sys/dev/mps
Christian Brueffer
brueffer at FreeBSD.org
Wed Jul 18 09:06:07 UTC 2012
Author: brueffer
Date: Wed Jul 18 09:06:07 2012
New Revision: 238574
URL: http://svn.freebsd.org/changeset/base/238574
Log:
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
Modified:
head/sys/dev/mps/mps_sas_lsi.c
Modified: head/sys/dev/mps/mps_sas_lsi.c
==============================================================================
--- head/sys/dev/mps/mps_sas_lsi.c Wed Jul 18 08:58:30 2012 (r238573)
+++ head/sys/dev/mps/mps_sas_lsi.c Wed Jul 18 09:06:07 2012 (r238574)
@@ -796,8 +796,10 @@ mpssas_get_sata_identify(struct mps_soft
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;
More information about the svn-src-head
mailing list