From bba52d5e9ecd0a1705fbac93b6d50ef6ec475315 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 11 Jan 2006 11:01:22 +0100 Subject: [PATCH] [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 --- net/ieee80211/softmac/ieee80211softmac_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.39.5