Skip to content

Commit

Permalink
Bluetooth: GATT: Fix not clearing stored data when unpairing
Browse files Browse the repository at this point in the history
GATT data shall not be considered conditional to BT_SETTINGS since
the data is stored in RAM it must also be cleared when unpairing.

Fixes zephyrproject-rtos#22514

Signed-off-by: Luiz Augusto von Dentz <[email protected]>
  • Loading branch information
Vudentz committed Feb 13, 2020
1 parent a717873 commit b41dcca
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions subsys/bluetooth/host/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1862,9 +1862,7 @@ static void unpair(u8_t id, const bt_addr_le_t *addr)
}
}

if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
bt_gatt_clear(id, addr);
}
bt_gatt_clear(id, addr);
}

static void unpair_remote(const struct bt_bond_info *info, void *data)
Expand Down

0 comments on commit b41dcca

Please sign in to comment.