diff options
Diffstat (limited to 'cmd/zpool/zpool_vdev.c')
-rw-r--r-- | cmd/zpool/zpool_vdev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/zpool/zpool_vdev.c b/cmd/zpool/zpool_vdev.c index cf6d2bfa5..cae911426 100644 --- a/cmd/zpool/zpool_vdev.c +++ b/cmd/zpool/zpool_vdev.c @@ -1699,8 +1699,10 @@ make_root_vdev(zpool_handle_t *zhp, nvlist_t *props, int force, int check_rep, if ((newroot = construct_spec(props, argc, argv)) == NULL) return (NULL); - if (zhp && ((poolconfig = zpool_get_config(zhp, NULL)) == NULL)) + if (zhp && ((poolconfig = zpool_get_config(zhp, NULL)) == NULL)) { + nvlist_free(newroot); return (NULL); + } /* * Validate each device to make sure that its not shared with another |