diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2011-03-22 13:12:20 +0100 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-03-31 14:22:57 -0300 |
commit | 8fce6357a9e72c4c9c846f9951895954bfb34ad1 (patch) | |
tree | e748707ede664b0fce23b762de370fdc3c51fe3f /net | |
parent | c68fb7ff29622a7db8264f939f94e37330c27080 (diff) | |
download | linux-3.10-8fce6357a9e72c4c9c846f9951895954bfb34ad1.tar.gz linux-3.10-8fce6357a9e72c4c9c846f9951895954bfb34ad1.tar.bz2 linux-3.10-8fce6357a9e72c4c9c846f9951895954bfb34ad1.zip |
Bluetooth: Allow for NULL data in mgmt_pending_add
Since index is in mgmt_hdr it is possible to have mgmt command with
no parameters that still needs to add itself to pending list.
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/mgmt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index d0c01230bba..93f0f04c8bc 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -239,7 +239,8 @@ static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode, return NULL; } - memcpy(cmd->param, data, len); + if (data) + memcpy(cmd->param, data, len); cmd->sk = sk; sock_hold(sk); |