From owner-svn-src-all@FreeBSD.ORG Wed Nov 19 16:04:08 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FED21065670; Wed, 19 Nov 2008 16:04:08 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F18748FC0C; Wed, 19 Nov 2008 16:04:07 +0000 (UTC) (envelope-from dfr@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 mAJG47iC021657; Wed, 19 Nov 2008 16:04:07 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAJG47fv021656; Wed, 19 Nov 2008 16:04:07 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811191604.mAJG47fv021656@svn.freebsd.org> From: Doug Rabson Date: Wed, 19 Nov 2008 16:04:07 +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: r185095 - head/sys/boot/i386/libi386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 19 Nov 2008 16:04:08 -0000 Author: dfr Date: Wed Nov 19 16:04:07 2008 New Revision: 185095 URL: http://svn.freebsd.org/changeset/base/185095 Log: 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: head/sys/boot/i386/libi386/biosdisk.c Modified: head/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- head/sys/boot/i386/libi386/biosdisk.c Wed Nov 19 14:57:00 2008 (r185094) +++ head/sys/boot/i386/libi386/biosdisk.c Wed Nov 19 16:04:07 2008 (r185095) @@ -969,8 +969,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); } @@ -1058,7 +1060,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");