drivers: entropy: bt_hci: Add missing netbuf unref
bt_hci_cmd_send_sync() requires the caller to unref the buffer that is sent back as a response. Add the missing call to net_buf_unref() accordingly. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
ce0f743400
commit
eb0de3384d
1 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,8 @@ static int entropy_bt_get_entropy(const struct device *dev,
|
||||||
/* Copy random data into buffer */
|
/* Copy random data into buffer */
|
||||||
rp = (void *)rsp->data;
|
rp = (void *)rsp->data;
|
||||||
memcpy(buffer, rp->rand, req);
|
memcpy(buffer, rp->rand, req);
|
||||||
|
|
||||||
|
net_buf_unref(rsp);
|
||||||
buffer += req;
|
buffer += req;
|
||||||
length -= req;
|
length -= req;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue