Skip to content

Commit

Permalink
brcm80211: fix null pointer access
Browse files Browse the repository at this point in the history
Do not unconditionally access the chan variable in
brcmf_cfg80211_mgmt_tx() as it may be NULL.
Use freq instead.

Introduced by c2ff8ca
("brcm80211: make mgmt_tx in brcmfmac accept a NULL channel")

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Antonio Quartulli authored and John W. Linville committed Jun 19, 2013
1 parent f2bbb07 commit 86a9c4a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -4050,8 +4050,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
le16_to_cpu(action_frame->len));

brcmf_dbg(TRACE, "Action frame, cookie=%lld, len=%d, freq=%d\n",
*cookie, le16_to_cpu(action_frame->len),
chan->center_freq);
*cookie, le16_to_cpu(action_frame->len), freq);

ack = brcmf_p2p_send_action_frame(cfg, cfg_to_ndev(cfg),
af_params);
Expand Down

0 comments on commit 86a9c4a

Please sign in to comment.