aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zfs
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/zfs')
-rw-r--r--cmd/zfs/zfs_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c
index 301e2957e..a4ffb1f44 100644
--- a/cmd/zfs/zfs_main.c
+++ b/cmd/zfs/zfs_main.c
@@ -6700,9 +6700,10 @@ zfs_do_diff(int argc, char **argv)
if ((atp = strchr(copy, '@')))
*atp = '\0';
- if ((zhp = zfs_open(g_zfs, copy, ZFS_TYPE_FILESYSTEM)) == NULL)
+ if ((zhp = zfs_open(g_zfs, copy, ZFS_TYPE_FILESYSTEM)) == NULL) {
+ free(copy);
return (1);
-
+ }
free(copy);
/*