svn commit: r238768 - stable/8/sys/dev/mps

Christian Brueffer brueffer at FreeBSD.org
Wed Jul 25 12:06:52 UTC 2012


Author: brueffer
Date: Wed Jul 25 12:06:52 2012
New Revision: 238768
URL: http://svn.freebsd.org/changeset/base/238768

Log:
  MFC: r238574
  
  Fix a small memory leak in mpssas_get_sata_identify().  The change has
  been submitted upstream as well.

Modified:
  stable/8/sys/dev/mps/mps_sas_lsi.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)

Modified: stable/8/sys/dev/mps/mps_sas_lsi.c
==============================================================================
--- stable/8/sys/dev/mps/mps_sas_lsi.c	Wed Jul 25 11:50:36 2012	(r238767)
+++ stable/8/sys/dev/mps/mps_sas_lsi.c	Wed Jul 25 12:06:52 2012	(r238768)
@@ -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-stable-8 mailing list