From owner-svn-src-stable@FreeBSD.ORG Thu May 28 07:37:50 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49BC91065670; Thu, 28 May 2009 07:37:50 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 379588FC0C; Thu, 28 May 2009 07:37:50 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4S7boMF027318; Thu, 28 May 2009 07:37:50 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4S7bout027317; Thu, 28 May 2009 07:37:50 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200905280737.n4S7bout027317@svn.freebsd.org> From: Kip Macy Date: Thu, 28 May 2009 07:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192969 - stable/7/sys/boot/i386/libi386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2009 07:37:50 -0000 Author: kmacy Date: Thu May 28 07:37:49 2009 New Revision: 192969 URL: http://svn.freebsd.org/changeset/base/192969 Log: MFC 185095 r185095 | dfr | 2008-11-19 08:04:07 -0800 (Wed, 19 Nov 2008) | 3 lines If we free the GPT partition list in bd_open_gpt() because of an error, don't try to free it again in bd_closedisk(). While I'm here, fix a DEBUG print. Modified: stable/7/sys/boot/i386/libi386/biosdisk.c Modified: stable/7/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- stable/7/sys/boot/i386/libi386/biosdisk.c Thu May 28 07:26:36 2009 (r192968) +++ stable/7/sys/boot/i386/libi386/biosdisk.c Thu May 28 07:37:49 2009 (r192969) @@ -996,8 +996,10 @@ bd_open_gpt(struct open_disk *od, struct od->od_boff = gp->gp_start; out: - if (error) + if (error) { free(od->od_partitions); + od->od_flags &= ~BD_GPTOK; + } return (error); } @@ -1088,7 +1090,7 @@ bd_realstrategy(void *devdata, int rw, d switch(rw){ case F_READ: - DEBUG("read %d from %d to %p", blks, dblk, buf); + DEBUG("read %d from %lld to %p", blks, dblk, buf); if (blks && bd_read(od, dblk, blks, buf)) { DEBUG("read error");