Skip to content
Snippets Groups Projects
Commit f742f85c authored by Felix Fietkau's avatar Felix Fietkau
Browse files

nl80211: fix a station dump crash triggered by sending an invalid ifindex

SVN-Revision: 23741
parent d9f29a16
No related branches found
No related tags found
No related merge requests found
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -224,8 +224,8 @@ static int nl80211_prepare_netdev_dump(s
}
*rdev = cfg80211_get_dev_from_ifindex(sock_net(skb->sk), ifidx);
- if (IS_ERR(dev)) {
- err = PTR_ERR(dev);
+ if (IS_ERR(*rdev)) {
+ err = PTR_ERR(*rdev);
goto out_rtnl;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment