Netdev List
 help / color / mirror / Atom feed
* [PATCH] nl80211: Allocate array of pointers for nla_parse
@ 2007-01-16 10:13 Marcus Better
  2007-01-16 10:42 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Marcus Better @ 2007-01-16 10:13 UTC (permalink / raw)
  To: netdev; +Cc: johannes

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@better.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;
-- 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-16 10:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-16 10:13 [PATCH] nl80211: Allocate array of pointers for nla_parse Marcus Better
2007-01-16 10:42 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox