dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Szymon Janc 2011-03-22 13:12:20 +01:00 committed by Gustavo F. Padovan
parent c68fb7ff29
commit 8fce6357a9
1 changed files with 2 additions and 1 deletions

View File

@ -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);