Print this page
6659 nvlist_free(NULL) is a no-op

@@ -3239,11 +3239,10 @@
                 case 'R':
                         flags.import = B_TRUE;
                         if (add_prop_list(
                             zpool_prop_to_name(ZPOOL_PROP_ALTROOT), optarg,
                             &props, B_TRUE) != 0) {
-                                if (props)
                                         nvlist_free(props);
                                 usage(B_FALSE);
                         }
                         break;
                 case 'n':

@@ -3253,11 +3252,10 @@
                         if ((propval = strchr(optarg, '=')) != NULL) {
                                 *propval = '\0';
                                 propval++;
                                 if (add_prop_list(optarg, propval,
                                     &props, B_TRUE) != 0) {
-                                        if (props)
                                                 nvlist_free(props);
                                         usage(B_FALSE);
                                 }
                         } else {
                                 mntopts = optarg;