summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-10-15 18:46:03 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-10-15 18:46:03 +0000
commit77d032a571a1760f234852af1cd2836260b51e1a (patch)
tree02bce2bea52cfef29778cf3dafeb2adfcc4e725e
parent9444f374309371e84206508b19d7b79a13daf745 (diff)
Do not pass uninitialized ifmedia structures to ifmedia_add(). Fixes PR1426.
Thanks to reinhard@ for testing.
-rw-r--r--sys/dev/ic/xl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c
index 89eb36a6512..931711f13f6 100644
--- a/sys/dev/ic/xl.c
+++ b/sys/dev/ic/xl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xl.c,v 1.14 2000/10/14 18:10:37 aaron Exp $ */
+/* $OpenBSD: xl.c,v 1.15 2000/10/15 18:46:02 aaron Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -2535,8 +2535,7 @@ xl_attach(sc)
ifmedia_add(ifm, IFM_ETHER|IFM_10_T, 0, NULL);
ifmedia_add(ifm, IFM_ETHER|IFM_10_T|IFM_HDX, 0, NULL);
if (sc->xl_caps & XL_CAPS_FULL_DUPLEX)
- ifmedia_add(&sc->ifmedia,
- IFM_ETHER|IFM_10_T|IFM_FDX, 0, NULL);
+ ifmedia_add(ifm, IFM_ETHER|IFM_10_T|IFM_FDX, 0, NULL);
}
if (sc->xl_media & (XL_MEDIAOPT_AUI|XL_MEDIAOPT_10FL)) {