diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/zpool/zpool_main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index c61639cc2..db2486aee 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -897,7 +897,8 @@ zpool_do_labelclear(int argc, char **argv) if (zpool_read_label(fd, &config, NULL) != 0 || config == NULL) { (void) fprintf(stderr, gettext("failed to check state for %s\n"), vdev); - return (1); + ret = 1; + goto errout; } nvlist_free(config); @@ -905,7 +906,8 @@ zpool_do_labelclear(int argc, char **argv) if (ret != 0) { (void) fprintf(stderr, gettext("failed to check state for %s\n"), vdev); - return (1); + ret = 1; + goto errout; } if (!inuse) |