diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-10-25 05:16:58 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-11-25 10:50:07 -0500 |
commit | 7fa322c878d70e38675f50e17acdce7fa3f5ac8c (patch) | |
tree | 2e25ac0a6badf54e809a708d54146d1b8144d9ca /net | |
parent | 9fe271af7d4de96471c5aaee2f4d0d1576050497 (diff) |
nl80211: check nla_nest_start() return value
Coverity pointed out that we might dereference NULL later
if nla_nest_start() returns a failure. This isn't really
true since we'd bomb out before, but we should check the
return value directly, so do that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/nl80211.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index f1370ed9f498..e20c27ff0f14 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -11094,6 +11094,8 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev, | |||
11094 | struct nlattr *reasons; | 11094 | struct nlattr *reasons; |
11095 | 11095 | ||
11096 | reasons = nla_nest_start(msg, NL80211_ATTR_WOWLAN_TRIGGERS); | 11096 | reasons = nla_nest_start(msg, NL80211_ATTR_WOWLAN_TRIGGERS); |
11097 | if (!reasons) | ||
11098 | goto free_msg; | ||
11097 | 11099 | ||
11098 | if (wakeup->disconnect && | 11100 | if (wakeup->disconnect && |
11099 | nla_put_flag(msg, NL80211_WOWLAN_TRIG_DISCONNECT)) | 11101 | nla_put_flag(msg, NL80211_WOWLAN_TRIG_DISCONNECT)) |