Author: mav
Date: Sun Oct 18 18:32:22 2015
New Revision: 289531
URL: https://svnweb.freebsd.org/changeset/base/289531

Log:
  MFV r289530: 5847 libzfs_diff should check zfs_prop_get() return
  
  Reviewed by: Matthew Ahrens <[email protected]>
  Reviewed by: Albert Lee <[email protected]>
  Approved by: Dan McDonald <[email protected]>
  Author: Alexander Eremin <[email protected]>
  
  illumos/illumos-gate@8430278980a48338e04c7dd52b495b7f1551367a

Modified:
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)
  head/cddl/contrib/opensolaris/lib/libzfs/   (props changed)

Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c       Sun Oct 
18 18:30:47 2015        (r289530)
+++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c       Sun Oct 
18 18:32:22 2015        (r289531)
@@ -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, co
 
                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;
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to