From owner-svn-src-all@freebsd.org Fri Nov 13 09:47:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4501EA2D51F; Fri, 13 Nov 2015 09:47:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C01A1EB0; Fri, 13 Nov 2015 09:47:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAD9lcEA016920; Fri, 13 Nov 2015 09:47:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAD9lcXT016919; Fri, 13 Nov 2015 09:47:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511130947.tAD9lcXT016919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 13 Nov 2015 09:47:38 +0000 (UTC) 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2015 09:47:39 -0000 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 Reviewed by: Albert Lee Approved by: Dan McDonald Author: Alexander Eremin 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;