summaryrefslogtreecommitdiffstats
path: root/lib/libzfs/libzfs_dataset.c
diff options
context:
space:
mode:
authorMartin Matuska <[email protected]>2012-08-21 23:42:00 +0200
committerBrian Behlendorf <[email protected]>2012-08-23 09:42:21 -0700
commitcf997d797b49384572c23b6b605bf72bd1415b35 (patch)
tree31c0d9d46756841ebe1d6ec9f2e38b073c6b8b5c /lib/libzfs/libzfs_dataset.c
parent4276c6f576d396b8c902da6cb168e64b2cff233e (diff)
Properly initialize and free destroydata
This regression was accidentally introduced by commit 330d06f90d143b41b276796526a66a1c1fff046d due to ZoL specific code. The fix is to simply ensure the passed nvlist is initialized and freed. Signed-off-by: Brian Behlendorf <[email protected]> Closes #876
Diffstat (limited to 'lib/libzfs/libzfs_dataset.c')
-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;
}