浏览代码

Avoid erasing non-existent signatures in undi_unload()

tags/v0.9.3
Michael Brown 17 年前
父节点
当前提交
ed44e3730d
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4
    2
      src/arch/i386/drivers/net/undiload.c

+ 4
- 2
src/arch/i386/drivers/net/undiload.c 查看文件

@@ -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 );

正在加载...
取消
保存