mps(4): Add a missing kfree().
authorSascha Wildner <saw@online.de>
Mon, 9 Apr 2012 01:31:45 +0000 (03:31 +0200)
committerSascha Wildner <saw@online.de>
Mon, 9 Apr 2012 01:32:00 +0000 (03:32 +0200)
sys/dev/raid/mps/mps_sas_lsi.c

index 15112cf..1bea24d 100644 (file)
@@ -702,8 +702,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) {
+               kfree(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;