projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
730f091
)
Bluetooth: Use kzalloc instead of kmalloc for pending mgmt commands
author
Johan Hedberg
<johan.hedberg@intel.com>
Sat, 28 Jun 2014 14:54:05 +0000
(17:54 +0300)
committer
Marcel Holtmann
<marcel@holtmann.org>
Thu, 3 Jul 2014 15:42:48 +0000
(17:42 +0200)
By using kzalloc we ensure that there are no struct members, such as the
user_data pointer, left uninitialized.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt.c
patch
|
blob
|
blame
|
history
diff --git
a/net/bluetooth/mgmt.c
b/net/bluetooth/mgmt.c
index d42c07d2a817882620cfcc49721e3d07d0f831d4..727ae15f9c3636c848fe2fba1c310c99171bd2d8 100644
(file)
--- a/
net/bluetooth/mgmt.c
+++ b/
net/bluetooth/mgmt.c
@@
-984,7
+984,7
@@
static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode,
{
struct pending_cmd *cmd;
- cmd = k
m
alloc(sizeof(*cmd), GFP_KERNEL);
+ cmd = k
z
alloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd)
return NULL;