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 size for kmem_free() calls when freein...



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

description:
Fix size for kmem_free() calls when freeing our VAP state.

diffstat:

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

diffs (21 lines):

diff -r 973657837dd1 -r baa81d41441f sys/dev/pci/if_rtwn.c
--- a/sys/dev/pci/if_rtwn.c     Sun Sep 27 12:56:51 2020 +0200
+++ b/sys/dev/pci/if_rtwn.c     Sun Sep 27 13:04:19 2020 +0200
@@ -456,7 +456,7 @@
        vap = kmem_zalloc(sizeof(*vap), KM_SLEEP);
        if (ieee80211_vap_setup(ic, &vap->vap, name, unit, opmode,
            flags | IEEE80211_CLONE_NOBEACONS, bssid) != 0) {
-               kmem_free(vap, sizeof(struct ieee80211vap));
+               kmem_free(vap, sizeof(*vap));
                return NULL;
        }
 
@@ -484,7 +484,7 @@
 
        bpf_detach(ifp);
        ieee80211_vap_detach(vap);
-       kmem_free(vap, sizeof(struct ieee80211vap));
+       kmem_free(vap, sizeof(*vap));
 }
 
 static void



Home | Main Index | Thread Index | Old Index