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-Tag: v2.6.17-rc1~994^2~12^2~11 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bba52d5e9ecd0a1705fbac93b6d50ef6ec475315;p=linux-2.6 [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 a142daea62..febc51dbb4 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 */