summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>2002-04-01 22:00:18 +0000
committermickey <mickey@openbsd.org>2002-04-01 22:00:18 +0000
commite39395b794ab4e54cbc76c96ebd6aa04fcc268a3 (patch)
tree881fb7018f41b62ec0d888ef51874a40564a9c0a
parenttypo: assign to self; ok markus@ solar@openwall.com (diff)
downloadwireguard-openbsd-e39395b794ab4e54cbc76c96ebd6aa04fcc268a3.tar.xz
wireguard-openbsd-e39395b794ab4e54cbc76c96ebd6aa04fcc268a3.zip
freem mbuf on input pkt check failure
-rw-r--r--sys/dev/ic/if_wi_hostap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/ic/if_wi_hostap.c b/sys/dev/ic/if_wi_hostap.c
index ada24808759..5866a7882b0 100644
--- a/sys/dev/ic/if_wi_hostap.c
+++ b/sys/dev/ic/if_wi_hostap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_hostap.c,v 1.7 2002/04/01 21:05:38 mickey Exp $ */
+/* $OpenBSD: if_wi_hostap.c,v 1.8 2002/04/01 22:00:18 mickey Exp $ */
/*
* Copyright (c) 2002
@@ -974,6 +974,7 @@ wihap_data_input(struct wi_softc *sc, struct wi_frame *rxfrm, struct mbuf *m)
if (ifp->if_flags & IFF_DEBUG)
printf("wihap_data_input: no TODS src=%s\n",
ether_sprintf(rxfrm->wi_addr2));
+ m_freem(m);
return(1);
}
@@ -982,6 +983,7 @@ wihap_data_input(struct wi_softc *sc, struct wi_frame *rxfrm, struct mbuf *m)
if (ifp->if_flags & IFF_DEBUG)
printf("wihap_data_input: incorrect bss: %s\n",
ether_sprintf(rxfrm->wi_addr1));
+ m_freem(m);
return(1);
}
@@ -996,6 +998,7 @@ wihap_data_input(struct wi_softc *sc, struct wi_frame *rxfrm, struct mbuf *m)
printf("wihap_data_input: dropping unassoc src %s\n",
ether_sprintf(rxfrm->wi_addr2));
splx(s);
+ m_freem(m);
return(1);
}