From c5f9a6097281cd63f9dd4b278e6ab63e3996b3e0 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Tue, 7 Nov 2023 15:09:54 +0530 Subject: [PATCH] Fix dangling pointer error during compilation --- nimble/host/src/ble_gap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c index 517f31e9b..f9f824155 100644 --- a/nimble/host/src/ble_gap.c +++ b/nimble/host/src/ble_gap.c @@ -1085,7 +1085,6 @@ ble_gap_master_connect_reattempt(uint16_t conn_handle) } /* Utilize cookie to get the index updated correctly for re-attempt */ - ble_conn_reattempt[idx].cb_arg = &conn; conn_cookie_enabled = true; rc = ble_gap_connect(ble_conn_reattempt[idx].own_addr_type, @@ -1093,7 +1092,7 @@ ble_gap_master_connect_reattempt(uint16_t conn_handle) ble_conn_reattempt[idx].duration_ms, &ble_conn_reattempt[idx].conn_params, ble_conn_reattempt[idx].cb, - ble_conn_reattempt[idx].cb_arg); + &conn); if (rc != 0) { return rc; }