From ed44e3730d73d1ccc7aa045a57cd8d2b0a14eb47 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 9 Jan 2007 02:53:24 +0000 Subject: [PATCH] Avoid erasing non-existent signatures in undi_unload() --- src/arch/i386/drivers/net/undiload.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/arch/i386/drivers/net/undiload.c b/src/arch/i386/drivers/net/undiload.c index 7ae62480..a0669d95 100644 --- a/src/arch/i386/drivers/net/undiload.c +++ b/src/arch/i386/drivers/net/undiload.c @@ -170,8 +170,10 @@ int undi_unload ( struct undi_device *undi ) { DBGC ( undi, "UNDI %p unloading\n", undi ); /* Erase signatures */ - put_real ( dead, undi->pxenv.segment, undi->pxenv.offset ); - put_real ( dead, undi->ppxe.segment, undi->ppxe.offset ); + if ( undi->pxenv.segment ) + put_real ( dead, undi->pxenv.segment, undi->pxenv.offset ); + if ( undi->ppxe_segment ) + put_real ( dead, undi->ppxe.segment, undi->ppxe.offset ); /* Free base memory, if possible */ get_real ( fbms, BDA_SEG, BDA_FBMS );