Date: Wed, 18 Jul 2012 09:06:07 +0000 (UTC) From: Christian Brueffer <brueffer@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r238574 - head/sys/dev/mps Message-ID: <201207180906.q6I967M3048808@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207180906.q6I967M3048808>