svn commit: r192969 - stable/7/sys/boot/i386/libi386
Kip Macy
kmacy at FreeBSD.org
Thu May 28 07:37:50 UTC 2009
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");
More information about the svn-src-stable
mailing list