diff options
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 46c3edc72cd1..34f58f4ad12b 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -92,7 +92,9 @@ static int cmd_complete(struct sock *sk, u16 index, u16 cmd, void *rp, | |||
92 | 92 | ||
93 | ev = (void *) skb_put(skb, sizeof(*ev) + rp_len); | 93 | ev = (void *) skb_put(skb, sizeof(*ev) + rp_len); |
94 | put_unaligned_le16(cmd, &ev->opcode); | 94 | put_unaligned_le16(cmd, &ev->opcode); |
95 | memcpy(ev->data, rp, rp_len); | 95 | |
96 | if (rp) | ||
97 | memcpy(ev->data, rp, rp_len); | ||
96 | 98 | ||
97 | if (sock_queue_rcv_skb(sk, skb) < 0) | 99 | if (sock_queue_rcv_skb(sk, skb) < 0) |
98 | kfree_skb(skb); | 100 | kfree_skb(skb); |