Bluetooth: SMP: Fix missing buffer unref for LE SC only mode
If pairing is rejected due to unsatisfying auth requirements pending response buffer should be freed. Change-Id: I8bbdad5fac8cd6dbcd674c7ad9725cf44ef79004 Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
parent
6edc0edd8a
commit
075e2c430a
1 changed files with 1 additions and 0 deletions
|
@ -1545,6 +1545,7 @@ static uint8_t smp_pairing_req(struct bt_smp *smp, struct net_buf *buf)
|
|||
#if defined(CONFIG_BLUETOOTH_SMP_SC_ONLY)
|
||||
if (!atomic_test_bit(&smp->flags, SMP_FLAG_SC) ||
|
||||
smp->method == JUST_WORKS) {
|
||||
net_buf_unref(rsp_buf);
|
||||
return BT_SMP_ERR_AUTH_REQUIREMENTS;
|
||||
}
|
||||
#endif/* CONFIG_BLUETOOTH_SMP_SC_ONLY */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue