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:
Carles Cufi 2022-03-30 17:38:30 +02:00 committed by Carles Cufí
commit eb0de3384d

View file

@ -39,6 +39,8 @@ static int entropy_bt_get_entropy(const struct device *dev,
/* Copy random data into buffer */
rp = (void *)rsp->data;
memcpy(buffer, rp->rand, req);
net_buf_unref(rsp);
buffer += req;
length -= req;
}