svn commit: r185095 - head/sys/boot/i386/libi386
Doug Rabson
dfr at FreeBSD.org
Wed Nov 19 08:04:08 PST 2008
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");
More information about the svn-src-all
mailing list