[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200701161113.52523.marcus@better.se>
Date: Tue, 16 Jan 2007 11:13:52 +0100
From: Marcus Better <marcus@...ter.se>
To: netdev@...r.kernel.org
Cc: johannes@...solutions.net
Subject: [PATCH] nl80211: Allocate array of pointers for nla_parse
The code allocates an array of struct nlattr, but it seems to me that it should allocate an array of pointers.
Signed-off-by: Marcus Better <marcus@...ter.se>
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -843,7 +843,7 @@ static int nl80211_initiate_scan(struct sk_buff *skb, struct genl_info *info)
channels = kmalloc(count * sizeof(struct scan_channel),
GFP_KERNEL);
- tb = kmalloc((NL80211_ATTR_MAX+1) * sizeof(struct nlattr),
+ tb = kmalloc((NL80211_ATTR_MAX+1) * sizeof(struct nlattr *),
GFP_KERNEL);
count = 0;
--
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists