提交 bba52d5e 编写于 作者: J Johannes Berg 提交者: John W. Linville

[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: NJohn W. Linville <linville@tuxdriver.com>
上级 1dc09776
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册