소스 검색

Avoid erasing non-existent signatures in undi_unload()

tags/v0.9.3
Michael Brown 18 년 전
부모
커밋
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 );

Loading…
취소
저장