svn commit: r353020 - head/sys/dev/nvdimm

Conrad Meyer cem at FreeBSD.org
Wed Oct 2 19:13:36 UTC 2019


Author: cem
Date: Wed Oct  2 19:13:35 2019
New Revision: 353020
URL: https://svnweb.freebsd.org/changeset/base/353020

Log:
  nvdimm: Fix error path mis-free
  
  Regression introduced in r343629 when malloc result was renamed from spa to
  spa_mapping and the 'spa' name was instead used to iterate a table, but the
  free() target was not updated.
  
  Reviewed by:	kib, scottph
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D21871

Modified:
  head/sys/dev/nvdimm/nvdimm_acpi.c

Modified: head/sys/dev/nvdimm/nvdimm_acpi.c
==============================================================================
--- head/sys/dev/nvdimm/nvdimm_acpi.c	Wed Oct  2 17:18:18 2019	(r353019)
+++ head/sys/dev/nvdimm/nvdimm_acpi.c	Wed Oct  2 19:13:35 2019	(r353020)
@@ -141,7 +141,7 @@ nvdimm_root_create_spas(struct nvdimm_root_dev *dev, A
 		error = nvdimm_spa_init(spa_mapping, *spa, spa_type);
 		if (error != 0) {
 			nvdimm_spa_fini(spa_mapping);
-			free(spa, M_NVDIMM_ACPI);
+			free(spa_mapping, M_NVDIMM_ACPI);
 			break;
 		}
 		nvdimm_create_namespaces(spa_mapping, nfitbl);


More information about the svn-src-head mailing list