diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/mount_zfs/mount_zfs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmd/mount_zfs/mount_zfs.c b/cmd/mount_zfs/mount_zfs.c index 27a9014b3..4db33ed69 100644 --- a/cmd/mount_zfs/mount_zfs.c +++ b/cmd/mount_zfs/mount_zfs.c @@ -246,11 +246,13 @@ parse_dataset(char *dataset) error = nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME, &name); - if (error == 0) + if (error) { + nvlist_free(config); + } else { dataset = strdup(name); - - nvlist_free(config); - return (dataset); + nvlist_free(config); + return (dataset); + } } out: /* |