projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4856bfd
)
cfg80211: Use kmemdup in cfg80211_gen_new_ie()
author
YueHaibing
<yuehaibing@huawei.com>
Mon, 25 Feb 2019 12:38:49 +0000
(12:38 +0000)
committer
Johannes Berg
<johannes.berg@intel.com>
Fri, 29 Mar 2019 10:22:55 +0000
(11:22 +0100)
Use kmemdup rather than duplicating its implementation
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c
patch
|
blob
|
history
diff --git
a/net/wireless/scan.c
b/net/wireless/scan.c
index
287518c
..
04d8886
100644
(file)
--- a/
net/wireless/scan.c
+++ b/
net/wireless/scan.c
@@
-190,10
+190,9
@@
static size_t cfg80211_gen_new_ie(const u8 *ie, size_t ielen,
/* copy subelement as we need to change its content to
* mark an ie after it is processed.
*/
- sub_copy = km
alloc(
subie_len, gfp);
+ sub_copy = km
emdup(subelement,
subie_len, gfp);
if (!sub_copy)
return 0;
- memcpy(sub_copy, subelement, subie_len);
pos = &new_ie[0];