diff options
| author | Alexander Motin <mav@FreeBSD.org> | 2015-10-18 18:32:22 +0000 |
|---|---|---|
| committer | Alexander Motin <mav@FreeBSD.org> | 2015-10-18 18:32:22 +0000 |
| commit | 7076459d74a1a85fadb304f86e1b84246c34e8c0 (patch) | |
| tree | c321e653ce4340163517c71253ac2a119ab97a81 /cddl/contrib | |
| parent | 686450c8984c60f2c21eb7c64afe0eac72244db0 (diff) | |
| parent | 43d8621a0c4bbf94be4dba2d9eda851f6464ec2c (diff) | |
Notes
Diffstat (limited to 'cddl/contrib')
| -rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c index dde329a8226f..bb49eba0f835 100644 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ /* @@ -624,9 +625,12 @@ get_snapshot_names(differ_info_t *di, const char *fromsnap, zhp = zfs_open(hdl, di->ds, ZFS_TYPE_FILESYSTEM); while (zhp != NULL) { - (void) zfs_prop_get(zhp, ZFS_PROP_ORIGIN, - origin, sizeof (origin), &src, NULL, 0, B_FALSE); - + if (zfs_prop_get(zhp, ZFS_PROP_ORIGIN, origin, + sizeof (origin), &src, NULL, 0, B_FALSE) != 0) { + (void) zfs_close(zhp); + zhp = NULL; + break; + } if (strncmp(origin, fromsnap, fsnlen) == 0) break; |
