Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Nov 2015 09:47:38 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r290763 - stable/10/cddl/contrib/opensolaris/lib/libzfs/common
Message-ID:  <201511130947.tAD9lcXT016919@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Fri Nov 13 09:47:37 2015
New Revision: 290763
URL: https://svnweb.freebsd.org/changeset/base/290763

Log:
  MFC r289531: 5847 libzfs_diff should check zfs_prop_get() return
  
  Reviewed by: Matthew Ahrens <mahrens@delphix.com>
  Reviewed by: Albert Lee <trisk@omniti.com>
  Approved by: Dan McDonald <danmcd@omniti.com>
  Author: Alexander Eremin <a.eremin@nexenta.com>
  
  illumos/illumos-gate@8430278980a48338e04c7dd52b495b7f1551367a

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

Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
==============================================================================
--- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c	Fri Nov 13 09:46:28 2015	(r290762)
+++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c	Fri Nov 13 09:47:37 2015	(r290763)
@@ -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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511130947.tAD9lcXT016919>