|
@@ -170,8 +170,10 @@ int undi_unload ( struct undi_device *undi ) {
|
170
|
170
|
DBGC ( undi, "UNDI %p unloading\n", undi );
|
171
|
171
|
|
172
|
172
|
/* Erase signatures */
|
173
|
|
- put_real ( dead, undi->pxenv.segment, undi->pxenv.offset );
|
174
|
|
- put_real ( dead, undi->ppxe.segment, undi->ppxe.offset );
|
|
173
|
+ if ( undi->pxenv.segment )
|
|
174
|
+ put_real ( dead, undi->pxenv.segment, undi->pxenv.offset );
|
|
175
|
+ if ( undi->ppxe_segment )
|
|
176
|
+ put_real ( dead, undi->ppxe.segment, undi->ppxe.offset );
|
175
|
177
|
|
176
|
178
|
/* Free base memory, if possible */
|
177
|
179
|
get_real ( fbms, BDA_SEG, BDA_FBMS );
|