]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] softmac: properly check return value of ieee80211softmac_alloc_mgt
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 11 Jan 2006 10:01:22 +0000 (11:01 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 23 Mar 2006 03:16:55 +0000 (22:16 -0500)
Properly check return value of ieee80211softmac_alloc_mgt
in ieee80211softmac_disassoc_deauth (patch by Denis Vlasenko)

Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/ieee80211/softmac/ieee80211softmac_io.c

index a142daea62972d12c0f9ffd729fca415d1f6c694..febc51dbb41247119f501625f6bd54f537dc0afc 100644 (file)
@@ -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 */