Bluetooth: Fix another incorrect memcpy call

This should also have been net_buf_add_mem(). Otherwise the buffer
gets corrupted.

Change-Id: I4687584777f446d398182c3e8c2cde5946987da4
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2016-12-28 14:10:06 +02:00
commit fce1938a24

View file

@ -957,7 +957,7 @@ static struct net_buf *create_frag(struct bt_conn *conn, struct net_buf *buf)
frag_len = min(conn_mtu(conn), net_buf_tailroom(frag));
memcpy(frag, buf->data, frag_len);
net_buf_add_mem(frag, buf->data, frag_len);
net_buf_pull(buf, frag_len);
return frag;