Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Oct 2017 19:36:22 +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: r324832 - stable/11/sys/contrib/libnv
Message-ID:  <201710211936.v9LJaMQ7019622@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: oshogbo
Date: Sat Oct 21 19:36:22 2017
New Revision: 324832
URL: https://svnweb.freebsd.org/changeset/base/324832

Log:
  MFC r323856:
  Free 'value' only once we are done freeing all individual
  
  Submitted by:	pjd@
  Found by:	scan-build
  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:34:54 2017	(r324831)
+++ stable/11/sys/contrib/libnv/nvpair.c	Sat Oct 21 19:36:22 2017	(r324832)
@@ -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++)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710211936.v9LJaMQ7019622>