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

Reply via email to