]> git.proxmox.com Git - mirror_zfs.git/blobdiff - cmd/zpool/zpool_main.c
Illumos 6659 - nvlist_free(NULL) is a no-op
[mirror_zfs.git] / cmd / zpool / zpool_main.c
index d6b9f49148499353c08df1f4b6f08be0c8da2943..0c48805d11ef76859edd84d4e27c7c5d19602330 100644 (file)
@@ -3674,8 +3674,7 @@ zpool_do_split(int argc, char **argv)
                        if (add_prop_list(
                            zpool_prop_to_name(ZPOOL_PROP_ALTROOT), optarg,
                            &props, B_TRUE) != 0) {
-                               if (props)
-                                       nvlist_free(props);
+                               nvlist_free(props);
                                usage(B_FALSE);
                        }
                        break;
@@ -3688,8 +3687,7 @@ zpool_do_split(int argc, char **argv)
                                propval++;
                                if (add_prop_list(optarg, propval,
                                    &props, B_TRUE) != 0) {
-                                       if (props)
-                                               nvlist_free(props);
+                                       nvlist_free(props);
                                        usage(B_FALSE);
                                }
                        } else {