summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg2014-06-28 16:54:05 +0200
committerMarcel Holtmann2014-07-03 17:42:48 +0200
commitfca20018e7b86a8716511c7681115baa47aca8e4 (patch)
treecac4df3860e49ac5448197482e730d8c8da0ec22
parentBluetooth: Increment management interface revision (diff)
downloadkernel-qcow2-linux-fca20018e7b86a8716511c7681115baa47aca8e4.tar.gz
kernel-qcow2-linux-fca20018e7b86a8716511c7681115baa47aca8e4.tar.xz
kernel-qcow2-linux-fca20018e7b86a8716511c7681115baa47aca8e4.zip
Bluetooth: Use kzalloc instead of kmalloc for pending mgmt commands
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>
-rw-r--r--net/bluetooth/mgmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index d42c07d2a817..727ae15f9c36 100644
--- 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 = kmalloc(sizeof(*cmd), GFP_KERNEL);
+ cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd)
return NULL;