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++)
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to