diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/fm/modules/common/zfs-diagnosis/zfs_de.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr/src/cmd/fm/modules/common/zfs-diagnosis/zfs_de.c b/usr/src/cmd/fm/modules/common/zfs-diagnosis/zfs_de.c index ab9a5fad9f..d1206a34d3 100644 --- a/usr/src/cmd/fm/modules/common/zfs-diagnosis/zfs_de.c +++ b/usr/src/cmd/fm/modules/common/zfs-diagnosis/zfs_de.c @@ -18,7 +18,9 @@ * * CDDL HEADER END */ + /* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -292,12 +294,16 @@ zpool_find_load_time(zpool_handle_t *zhp, void *arg) nvlist_t *config; uint_t nelem; - if (lta->lt_found) + if (lta->lt_found) { + zpool_close(zhp); return (0); + } pool_guid = zpool_get_prop_int(zhp, ZPOOL_PROP_GUID, NULL); - if (pool_guid != lta->lt_guid) + if (pool_guid != lta->lt_guid) { + zpool_close(zhp); return (0); + } if ((config = zpool_get_config(zhp, NULL)) == NULL) { zpool_close(zhp); @@ -311,6 +317,8 @@ zpool_find_load_time(zpool_handle_t *zhp, void *arg) lta->lt_time->ertv_nsec = tod[1]; } + zpool_close(zhp); + return (0); } |