Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Oct 2018 19:00:46 +0000 (UTC)
From:      "Kenneth D. Merry" <ken@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339076 - head/sys/cam/scsi
Message-ID:  <201810011900.w91J0kpj026306@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ken
Date: Mon Oct  1 19:00:46 2018
New Revision: 339076
URL: https://svnweb.freebsd.org/changeset/base/339076

Log:
  Fix a da(4) driver memory leak for SCSI SMR devices.
  
  In the probe case for SCSI SMR Host Aware or Most Managed drives, be sure
  to free allocated memory.
  
  sys/cam/scsi/scsi_da.c:
  	In dadone_probezone(), free the data pointer before returning.
  
  MFC after:	3 days
  Sponsored by:	Spectra Logic
  Approved by:	re (kib)

Modified:
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c	Mon Oct  1 18:51:39 2018	(r339075)
+++ head/sys/cam/scsi/scsi_da.c	Mon Oct  1 19:00:46 2018	(r339076)
@@ -5674,6 +5674,9 @@ dadone_probezone(struct cam_periph *periph, union ccb 
 			}
 		}
 	}
+
+	free(csio->data_ptr, M_SCSIDA);
+
 	daprobedone(periph, done_ccb);
 	return;
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810011900.w91J0kpj026306>