Date: Sun, 10 Feb 2019 23:30:55 +0000 (UTC) From: Mariusz Zaborski <oshogbo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343987 - head/sys/contrib/libnv Message-ID: <201902102330.x1ANUtLl021919@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: oshogbo Date: Sun Feb 10 23:30:54 2019 New Revision: 343987 URL: https://svnweb.freebsd.org/changeset/base/343987 Log: libnv: fix memory leaks Free the data array for NV_TYPE_DESCRIPTOR_ARRAY case. MFC after: 2 weeks Modified: head/sys/contrib/libnv/nvpair.c Modified: head/sys/contrib/libnv/nvpair.c ============================================================================== --- head/sys/contrib/libnv/nvpair.c Sun Feb 10 23:28:55 2019 (r343986) +++ head/sys/contrib/libnv/nvpair.c Sun Feb 10 23:30:54 2019 (r343987) @@ -2061,6 +2061,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?201902102330.x1ANUtLl021919>