1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

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
This commit is contained in:
Conrad Meyer 2019-10-02 19:13:35 +00:00
parent 982f1fc2d8
commit 31f1c8fc84
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353020

View File

@ -141,7 +141,7 @@ nvdimm_root_create_spas(struct nvdimm_root_dev *dev, ACPI_TABLE_NFIT *nfitbl)
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);