Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1afd4e87 authored by Johannes Berg's avatar Johannes Berg Committed by Ahmad Kholaif
Browse files

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: default avatarJohannes Berg <johannes.berg@intel.com>
Git-commit: 7fa322c878d70e38675f50e17acdce7fa3f5ac8c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Change-Id: Id72a2ea390ae7c017a87bc678b0cc280dd0b3a5f
Signed-off-by: default avatarAhmad Kholaif <akholaif@codeaurora.org>
parent cc382d4a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -10826,6 +10826,8 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
		struct nlattr *reasons;

		reasons = nla_nest_start(msg, NL80211_ATTR_WOWLAN_TRIGGERS);
		if (!reasons)
			goto free_msg;

		if (wakeup->disconnect &&
		    nla_put_flag(msg, NL80211_WOWLAN_TRIG_DISCONNECT))