Date: Sun, 17 Feb 2019 18:26:27 +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: r344235 - head/sys/contrib/libnv Message-ID: <201902171826.x1HIQRdg095459@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: oshogbo Date: Sun Feb 17 18:26:27 2019 New Revision: 344235 URL: https://svnweb.freebsd.org/changeset/base/344235 Log: libnv: fix double free In r343986 we introduced a double free. The structure was already freed fixed in the r302966. This problem was introduced because the GitHub version was out of sync with the FreeBSD one. Submitted by: Mindaugas Rasiukevicius <rmind@netbsd.org> MFC with: r343986 Modified: head/sys/contrib/libnv/nvpair.c Modified: head/sys/contrib/libnv/nvpair.c ============================================================================== --- head/sys/contrib/libnv/nvpair.c Sun Feb 17 17:47:08 2019 (r344234) +++ head/sys/contrib/libnv/nvpair.c Sun Feb 17 18:26:27 2019 (r344235) @@ -229,14 +229,6 @@ nvpair_remove_nvlist_array(nvpair_t *nvp) nvlarray = __DECONST(nvlist_t **, nvpair_get_nvlist_array(nvp, &count)); for (i = 0; i < count; i++) { - nvlist_t *nvl; - nvpair_t *nnvp; - - nvl = nvlarray[i]; - nnvp = nvlist_get_array_next_nvpair(nvl); - if (nnvp != NULL) { - nvpair_free_structure(nnvp); - } nvlist_set_array_next(nvl, NULL); nvlist_set_parent(nvl, NULL); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902171826.x1HIQRdg095459>