Date: Sat, 21 Oct 2017 19:38:36 +0000 (UTC) From: Mariusz Zaborski <oshogbo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r324834 - stable/11/sys/contrib/libnv Message-ID: <201710211938.v9LJcaTW019802@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: oshogbo Date: Sat Oct 21 19:38:36 2017 New Revision: 324834 URL: https://svnweb.freebsd.org/changeset/base/324834 Log: MFC r323860: Plug memory leak in case when nvlist allocation succeeds, but nvpair allocation fails. Submitted by: pjd@ Sponsored by: Wheel Systems Modified: stable/11/sys/contrib/libnv/nvpair.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/libnv/nvpair.c ============================================================================== --- stable/11/sys/contrib/libnv/nvpair.c Sat Oct 21 19:37:25 2017 (r324833) +++ stable/11/sys/contrib/libnv/nvpair.c Sat Oct 21 19:38:36 2017 (r324834) @@ -1087,7 +1087,7 @@ nvpair_unpack_nvlist_array(bool isbe __unused, nvpair_ return (ptr); fail: ERRNO_SAVE(); - for (j = 0; j < ii; j++) + for (j = 0; j <= ii; j++) nvlist_destroy(value[j]); nv_free(value); ERRNO_RESTORE();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710211938.v9LJcaTW019802>