Don't use nvl in case of a failure.
Reported by: Coverity CID: 1238922
This commit is contained in:
parent
fb767c2ba2
commit
d3c24fcffe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=271847
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user