From owner-svn-src-head@FreeBSD.ORG Mon May 31 09:06:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 908CA1065676; Mon, 31 May 2010 09:06:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 801C58FC13; Mon, 31 May 2010 09:06:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4V963h9020342; Mon, 31 May 2010 09:06:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4V963LD020340; Mon, 31 May 2010 09:06:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201005310906.o4V963LD020340@svn.freebsd.org> From: Andriy Gapon Date: Mon, 31 May 2010 09:06:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208669 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 May 2010 09:06:03 -0000 Author: avg Date: Mon May 31 09:06:03 2010 New Revision: 208669 URL: http://svn.freebsd.org/changeset/base/208669 Log: zfs boot: fix error handling in zfs_readdir Found by: clang static analyzer MFC after: 4 days Modified: head/sys/boot/zfs/zfs.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Mon May 31 07:14:40 2010 (r208668) +++ head/sys/boot/zfs/zfs.c Mon May 31 09:06:03 2010 (r208669) @@ -265,6 +265,8 @@ zfs_readdir(struct open_file *f, struct rc = dnode_read(spa, &fp->f_dnode, fp->f_seekp, &mze, sizeof(mze)); + if (rc) + return (rc); fp->f_seekp += sizeof(mze); if (!mze.mze_name[0])