aboutsummaryrefslogtreecommitdiff
path: root/lib/libnv/nvpair.c
diff options
context:
space:
mode:
authorRyan Stone <rstone@FreeBSD.org>2015-03-01 00:22:38 +0000
committerRyan Stone <rstone@FreeBSD.org>2015-03-01 00:22:38 +0000
commit19a4afb3e66774321eb597d10a3eeedba8565a97 (patch)
tree883d08fdd05c26d1b9d4a601c8316d40dd2e875c /lib/libnv/nvpair.c
parented007c94ba70724d589deded7ab5d21f39ed9a94 (diff)
Notes
Diffstat (limited to 'lib/libnv/nvpair.c')
-rw-r--r--lib/libnv/nvpair.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libnv/nvpair.c b/lib/libnv/nvpair.c
index a2da8cc1bd7a..45cca6a6f02f 100644
--- a/lib/libnv/nvpair.c
+++ b/lib/libnv/nvpair.c
@@ -1128,6 +1128,12 @@ nvpair_movev_nvlist(nvlist_t *value, const char *namefmt, va_list nameap)
return (NULL);
}
+ if (nvlist_error(value) != 0) {
+ errno = nvlist_error(value);
+ nvlist_destroy(value);
+ return (NULL);
+ }
+
nvp = nvpair_allocv(NV_TYPE_NVLIST, (uint64_t)(uintptr_t)value, 0,
namefmt, nameap);
if (nvp == NULL)