Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 57e6d784 authored by Xenia Ragiadakou's avatar Xenia Ragiadakou Committed by Greg Kroah-Hartman
Browse files

wlan-ng: replace calls to kmalloc and memcpy with kmemdup



This patch replaces calls to kmalloc that are followed
by memcpy with calls to kmemdup.
This patch was found using coccicheck with api/memdup.cocci,
with memdup.cocci script slightly altered in the following way:

@depends on patch@
expression from,to,size,flag;
position p != {r1.p,r2.p};
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = kmemdup(from,size,flag);
-  memcpy(to, from, size);

Signed-off-by: default avatarXenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c7cd6e92
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment