From: Marcus Better <marcus@better.se>
To: netdev@vger.kernel.org
Cc: johannes@sipsolutions.net
Subject: [PATCH] nl80211: Allocate array of pointers for nla_parse
Date: Tue, 16 Jan 2007 11:13:52 +0100 [thread overview]
Message-ID: <200701161113.52523.marcus@better.se> (raw)
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;
--
next reply other threads:[~2007-01-16 10:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-16 10:13 Marcus Better [this message]
2007-01-16 10:42 ` [PATCH] nl80211: Allocate array of pointers for nla_parse Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200701161113.52523.marcus@better.se \
--to=marcus@better.se \
--cc=johannes@sipsolutions.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox