Browse Source

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>
pull/44452/head
Carles Cufi 3 years ago committed by Carles Cufí
parent
commit
eb0de3384d
  1. 2
      drivers/entropy/entropy_bt_hci.c

2
drivers/entropy/entropy_bt_hci.c

@ -39,6 +39,8 @@ static int entropy_bt_get_entropy(const struct device *dev, @@ -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;
}

Loading…
Cancel
Save