diff options
| author | Michael Brown | 2007-01-09 03:53:24 +0100 |
|---|---|---|
| committer | Michael Brown | 2007-01-09 03:53:24 +0100 |
| commit | ed44e3730d73d1ccc7aa045a57cd8d2b0a14eb47 (patch) | |
| tree | 4b9c552200fcd63918d845ad8229f078adefb6dc /src/arch/i386/drivers/net | |
| parent | Avoid leaving preloaded_undi with invalid PXENV+/!PXE structure (diff) | |
| download | ipxe-ed44e3730d73d1ccc7aa045a57cd8d2b0a14eb47.tar.gz ipxe-ed44e3730d73d1ccc7aa045a57cd8d2b0a14eb47.tar.xz ipxe-ed44e3730d73d1ccc7aa045a57cd8d2b0a14eb47.zip | |
Avoid erasing non-existent signatures in undi_unload()
Diffstat (limited to 'src/arch/i386/drivers/net')
| -rw-r--r-- | src/arch/i386/drivers/net/undiload.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arch/i386/drivers/net/undiload.c b/src/arch/i386/drivers/net/undiload.c index 7ae62480d..a0669d959 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 ); |
