diff options
| author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> | 2016-02-24 11:58:55 -0500 |
|---|---|---|
| committer | Robert Mustacchi <rm@joyent.com> | 2016-02-27 08:52:10 -0800 |
| commit | aab83bb83be7342f6cfccaed8d5fe0b2f404855d (patch) | |
| tree | 548e8760643ee94860fb29486fbf965675c52a59 /usr/src/cmd/zoneadm | |
| parent | d643a855cbd8c4fb4fe966406fa05dff70673597 (diff) | |
| download | illumos-joyent-aab83bb83be7342f6cfccaed8d5fe0b2f404855d.tar.gz | |
6659 nvlist_free(NULL) is a no-op
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Marcel Telka <marcel@telka.sk>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/cmd/zoneadm')
| -rw-r--r-- | usr/src/cmd/zoneadm/zfs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr/src/cmd/zoneadm/zfs.c b/usr/src/cmd/zoneadm/zfs.c index d27b9c4678..a279cd6823 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); @@ -988,8 +987,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); } |
