svn commit: r271847 - head/lib/libnv

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu Sep 18 22:34:53 UTC 2014


Author: pjd
Date: Thu Sep 18 22:34:52 2014
New Revision: 271847
URL: http://svnweb.freebsd.org/changeset/base/271847

Log:
  Don't use nvl in case of a failure.
  
  Reported by:	Coverity
  CID:		1238922

Modified:
  head/lib/libnv/nvpair.c

Modified: head/lib/libnv/nvpair.c
==============================================================================
--- head/lib/libnv/nvpair.c	Thu Sep 18 22:27:02 2014	(r271846)
+++ head/lib/libnv/nvpair.c	Thu Sep 18 22:34:52 2014	(r271847)
@@ -963,7 +963,8 @@ nvpair_createv_nvlist(const nvlist_t *va
 	    namefmt, nameap);
 	if (nvp == NULL)
 		nvlist_destroy(nvl);
-	nvlist_set_parent(nvl, nvp);
+	else
+		nvlist_set_parent(nvl, nvp);
 
 	return (nvp);
 }


More information about the svn-src-head mailing list