Date: Thu, 11 Feb 2021 05:15:17 GMT From: Ravi Pokala <rpokala@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 40c1f835412d - stable/12 - nvdimm: Fix error path mis-free Message-ID: <202102110515.11B5FHhY012509@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by rpokala: URL: https://cgit.FreeBSD.org/src/commit/?id=40c1f835412d3e00901a146db6c317d654e65980 commit 40c1f835412d3e00901a146db6c317d654e65980 Author: Conrad Meyer <cem@FreeBSD.org> AuthorDate: 2019-10-02 19:13:35 +0000 Commit: Ravi Pokala <rpokala@FreeBSD.org> CommitDate: 2021-02-11 05:03:07 +0000 nvdimm: Fix error path mis-free (diff applied manually due to refactoring) 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 (cherry picked from commit 31f1c8fc84c850d73e74781126e12efceb50032b) --- sys/dev/nvdimm/nvdimm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvdimm/nvdimm.c b/sys/dev/nvdimm/nvdimm.c index a2ab0f89a879..b2c716044d5d 100644 --- a/sys/dev/nvdimm/nvdimm.c +++ b/sys/dev/nvdimm/nvdimm.c @@ -460,7 +460,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); + free(spa_mapping, M_NVDIMM); break; } nvdimm_create_namespaces(spa_mapping, nfitbl);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102110515.11B5FHhY012509>