From owner-svn-src-head@freebsd.org Thu Sep 21 10:14:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8351FE22091; Thu, 21 Sep 2017 10:14:44 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5073B72A45; Thu, 21 Sep 2017 10:14:44 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LAEhde072913; Thu, 21 Sep 2017 10:14:43 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LAEhlK072912; Thu, 21 Sep 2017 10:14:43 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709211014.v8LAEhlK072912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 21 Sep 2017 10:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323856 - head/sys/contrib/libnv X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/contrib/libnv X-SVN-Commit-Revision: 323856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 10:14:44 -0000 Author: oshogbo Date: Thu Sep 21 10:14:43 2017 New Revision: 323856 URL: https://svnweb.freebsd.org/changeset/base/323856 Log: Free 'value' only once we are done freeing all individual Submitted by: pjd@ MFC after: 1 month Found by: scan-build Sponsored by: Wheel Systems Modified: head/sys/contrib/libnv/nvpair.c Modified: head/sys/contrib/libnv/nvpair.c ============================================================================== --- head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:13:48 2017 (r323855) +++ head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:14:43 2017 (r323856) @@ -1727,8 +1727,8 @@ fail: nvlist_get_pararr(value[ii], NULL) != NULL) { nvlist_destroy(value[ii]); } - nv_free(value); } + nv_free(value); ERRNO_RESTORE(); } else { for (ii = 0; ii < nitems; ii++)