From: Johannes Berg Date: Wed, 11 Jan 2006 10:01:22 +0000 (+0100) Subject: [PATCH] softmac: properly check return value of ieee80211softmac_alloc_mgt X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=bba52d5e9ecd0a1705fbac93b6d50ef6ec475315;p=openwrt%2Fstaging%2Fblogic.git [PATCH] softmac: properly check return value of ieee80211softmac_alloc_mgt Properly check return value of ieee80211softmac_alloc_mgt in ieee80211softmac_disassoc_deauth (patch by Denis Vlasenko) Signed-off-by: John W. Linville --- diff --git a/net/ieee80211/softmac/ieee80211softmac_io.c b/net/ieee80211/softmac/ieee80211softmac_io.c index a142daea6297..febc51dbb412 100644 --- a/net/ieee80211/softmac/ieee80211softmac_io.c +++ b/net/ieee80211/softmac/ieee80211softmac_io.c @@ -308,7 +308,7 @@ ieee80211softmac_disassoc_deauth(struct ieee80211_disassoc **pkt, { /* Allocate Packet */ (*pkt) = (struct ieee80211_disassoc *)ieee80211softmac_alloc_mgt(2); - if (unlikely(pkt == NULL)) + if (unlikely((*pkt) == NULL)) return 0; ieee80211softmac_hdr_3addr(mac, &((*pkt)->header), type, net->bssid, net->bssid); /* Reason */