Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/dev/pci Fix another kmem_free() sizeof botch



details:   https://anonhg.NetBSD.org/src-all/rev/cd01ee1248eb
branches:  trunk
changeset: 364192:cd01ee1248eb
user:      Martin Husemann <martin%NetBSD.org@localhost>
date:      Sun Sep 27 13:18:54 2020 +0200

description:
Fix another kmem_free() sizeof botch

diffstat:

 sys/dev/pci/if_rtwn.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 4791f8e4e9f2 -r cd01ee1248eb sys/dev/pci/if_rtwn.c
--- a/sys/dev/pci/if_rtwn.c     Sun Sep 27 13:13:40 2020 +0200
+++ b/sys/dev/pci/if_rtwn.c     Sun Sep 27 13:18:54 2020 +0200
@@ -477,12 +477,13 @@
 }
 
 static void
-rtwn_vap_delete(struct ieee80211vap *vap)
+rtwn_vap_delete(struct ieee80211vap *arg)
 {       
-       struct ifnet *ifp = vap->iv_ifp;
+       struct ifnet *ifp = arg->iv_ifp;
+       struct rtwn_vap *vap = (struct rtwn_vap *)arg;
 
        bpf_detach(ifp);
-       ieee80211_vap_detach(vap);
+       ieee80211_vap_detach(arg);
        kmem_free(vap, sizeof(*vap));
 }
 



Home | Main Index | Thread Index | Old Index