summaryrefslogtreecommitdiff
path: root/usr/src/cmd/zoneadm/zfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/zoneadm/zfs.c')
-rw-r--r--usr/src/cmd/zoneadm/zfs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr/src/cmd/zoneadm/zfs.c b/usr/src/cmd/zoneadm/zfs.c
index 78c165ffd1..327daec20c 100644
--- a/usr/src/cmd/zoneadm/zfs.c
+++ b/usr/src/cmd/zoneadm/zfs.c
@@ -381,8 +381,7 @@ clone_snap(char *snapshot_name, char *zonepath)
"off") != 0) ||
(nvlist_add_string(props, zfs_prop_to_name(ZFS_PROP_SHARESMB),
"off") != 0)) {
- if (props != NULL)
- nvlist_free(props);
+ nvlist_free(props);
(void) fprintf(stderr, gettext("could not create ZFS clone "
"%s: out of memory\n"), zonepath);
return (Z_ERR);
@@ -989,8 +988,7 @@ create_zfs_zonepath(char *zonepath)
"off") != 0) ||
(nvlist_add_string(props, zfs_prop_to_name(ZFS_PROP_SHARESMB),
"off") != 0)) {
- if (props != NULL)
- nvlist_free(props);
+ nvlist_free(props);
(void) fprintf(stderr, gettext("cannot create ZFS dataset %s: "
"out of memory\n"), zfs_name);
}