Don't use nvl in case of a failure.

Reported by:	Coverity
CID:		1238922
This commit is contained in:
Pawel Jakub Dawidek 2014-09-18 22:34:52 +00:00
parent fb767c2ba2
commit d3c24fcffe
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=271847

View File

@ -963,7 +963,8 @@ nvpair_createv_nvlist(const nvlist_t *value, const char *namefmt,
namefmt, nameap);
if (nvp == NULL)
nvlist_destroy(nvl);
nvlist_set_parent(nvl, nvp);
else
nvlist_set_parent(nvl, nvp);
return (nvp);
}