Date: Tue, 6 Jul 2021 18:25:55 GMT From: Mariusz Zaborski <oshogbo@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: bc2bc8ee6e18 - stable/12 - libnv: fix memory leaks Message-ID: <202107061825.166IPtT0093238@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=bc2bc8ee6e1814361125c189591917be0fa5e4c1 commit bc2bc8ee6e1814361125c189591917be0fa5e4c1 Author: Mariusz Zaborski <oshogbo@FreeBSD.org> AuthorDate: 2019-02-10 23:30:54 +0000 Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> CommitDate: 2021-07-06 17:58:08 +0000 libnv: fix memory leaks Free the data array for NV_TYPE_DESCRIPTOR_ARRAY case. MFC after: 2 weeks (cherry picked from commit 0020c845a086766b3315372f006363f8ad76ac54) --- sys/contrib/libnv/nvpair.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/contrib/libnv/nvpair.c b/sys/contrib/libnv/nvpair.c index b767b9bbf972..556203f740fc 100644 --- a/sys/contrib/libnv/nvpair.c +++ b/sys/contrib/libnv/nvpair.c @@ -2062,6 +2062,7 @@ nvpair_free(nvpair_t *nvp) case NV_TYPE_DESCRIPTOR_ARRAY: for (i = 0; i < nvp->nvp_nitems; i++) close(((int *)(intptr_t)nvp->nvp_data)[i]); + nv_free((int *)(intptr_t)nvp->nvp_data); break; #endif case NV_TYPE_NVLIST:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107061825.166IPtT0093238>