From 4f059ec4fa532e7c8a997a8fd1bf1751dbe10380 Mon Sep 17 00:00:00 2001 From: Onkar Date: Tue, 24 May 2022 15:25:42 +0530 Subject: [PATCH] Bugfix: fix re-pairing issue --- nimble/host/src/ble_hs_resolv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nimble/host/src/ble_hs_resolv.c b/nimble/host/src/ble_hs_resolv.c index b10fd50ef..75a60d732 100644 --- a/nimble/host/src/ble_hs_resolv.c +++ b/nimble/host/src/ble_hs_resolv.c @@ -97,6 +97,7 @@ ble_rpa_remove_peer_dev_rec(struct ble_hs_dev_records *p_dev_rec) if ((i != ble_store_num_peer_dev_rec) && (ble_store_num_peer_dev_rec != 0)) { memmove(&peer_dev_rec[i], &peer_dev_rec[i + 1], (ble_store_num_peer_dev_rec - i) * sizeof(struct ble_hs_dev_records )); + memset(&peer_dev_rec[ble_store_num_peer_dev_rec], 0, sizeof(struct ble_hs_dev_records)); } BLE_HS_LOG(DEBUG, " RPA: removed device at index = %d, no. of peer records"