Browse Source

[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 <linville@tuxdriver.com>
Johannes Berg 19 years ago
parent
commit
bba52d5e9e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/ieee80211/softmac/ieee80211softmac_io.c

+ 1 - 1
net/ieee80211/softmac/ieee80211softmac_io.c

@@ -308,7 +308,7 @@ ieee80211softmac_disassoc_deauth(struct ieee80211_disassoc **pkt,
 {
 {
 	/* Allocate Packet */
 	/* Allocate Packet */
 	(*pkt) = (struct ieee80211_disassoc *)ieee80211softmac_alloc_mgt(2);
 	(*pkt) = (struct ieee80211_disassoc *)ieee80211softmac_alloc_mgt(2);
-	if (unlikely(pkt == NULL))
+	if (unlikely((*pkt) == NULL))
 		return 0;
 		return 0;
 	ieee80211softmac_hdr_3addr(mac, &((*pkt)->header), type, net->bssid, net->bssid);
 	ieee80211softmac_hdr_3addr(mac, &((*pkt)->header), type, net->bssid, net->bssid);
 	/* Reason */
 	/* Reason */