svn commit: r323856 - head/sys/contrib/libnv

Mariusz Zaborski oshogbo at FreeBSD.org
Thu Sep 21 10:14:44 UTC 2017


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++)


More information about the svn-src-head mailing list