summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_dataset.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c
index 476598cb2..2d795d33a 100644
--- a/lib/libzfs/libzfs_dataset.c
+++ b/lib/libzfs/libzfs_dataset.c
@@ -3875,7 +3875,9 @@ zfs_rename(zfs_handle_t *zhp, const char *target, boolean_t recursive)
dd.snapname = delim + 1;
/* We remove any zvol links prior to renaming them */
+ verify(nvlist_alloc(&dd.nvl, NV_UNIQUE_NAME, 0) == 0);
ret = zfs_iter_filesystems(zhrp, zfs_check_snap_cb, &dd);
+ nvlist_free(dd.nvl);
if (ret) {
goto error;
}