diff options
| author | 2010-12-06 05:46:17 +0000 | |
|---|---|---|
| committer | 2010-12-06 05:46:17 +0000 | |
| commit | 30211b63f77e070c3c72ddf0099a3958ec165950 (patch) | |
| tree | d0d4890e7950f0e327262748175deec9036b9673 /sys/dev/usb/if_upl.c | |
| parent | * replace per-driver dying and/or other state variables with use of (diff) | |
| download | wireguard-openbsd-30211b63f77e070c3c72ddf0099a3958ec165950.tar.xz wireguard-openbsd-30211b63f77e070c3c72ddf0099a3958ec165950.zip | |
a couple unchecked if_detach() in detach routines that were missed
in previous sweep (avoid NULL deref if the device didn't fully attach)
Diffstat (limited to 'sys/dev/usb/if_upl.c')
| -rw-r--r-- | sys/dev/usb/if_upl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c index a3599941706..0c91e0773a1 100644 --- a/sys/dev/usb/if_upl.c +++ b/sys/dev/usb/if_upl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_upl.c,v 1.44 2010/09/24 08:33:59 yuo Exp $ */ +/* $OpenBSD: if_upl.c,v 1.45 2010/12/06 05:46:17 jakemsr Exp $ */ /* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -334,7 +334,8 @@ upl_detach(struct device *self, int flags) if (ifp->if_flags & IFF_RUNNING) upl_stop(sc); - if_detach(ifp); + if (ifp->if_softc != NULL) + if_detach(ifp); #ifdef DIAGNOSTIC if (sc->sc_ep[UPL_ENDPT_TX] != NULL || |
