Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Sep 2017 10:14:43 +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: r323856 - head/sys/contrib/libnv
Message-ID:  <201709211014.v8LAEhlK072912@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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++)



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