Date: Sat, 2 Feb 2019 16:01:17 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343679 - head/sys/dev/usb/wlan Message-ID: <201902021601.x12G1Hte090057@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avos Date: Sat Feb 2 16:01:16 2019 New Revision: 343679 URL: https://svnweb.freebsd.org/changeset/base/343679 Log: run(4): fix allocated memory type and -Wincompatible-pointer-types compiler warning. PR: 177366 MFC after: 3 days Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sat Feb 2 05:49:05 2019 (r343678) +++ head/sys/dev/usb/wlan/if_run.c Sat Feb 2 16:01:16 2019 (r343679) @@ -2029,7 +2029,14 @@ run_read_eeprom(struct run_softc *sc) static struct ieee80211_node * run_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) { - return malloc(sizeof (struct run_node), M_DEVBUF, M_NOWAIT | M_ZERO); + struct run_node *rn; + + rn = malloc(sizeof (struct run_node), M_80211_NODE, M_NOWAIT | M_ZERO); + + if (rn == NULL) + return (NULL); + + return (&rn->ni); } static int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902021601.x12G1Hte090057>