Nimble: Removed extra npl_event_init being done during

periodic_sync_alloc
This commit is contained in:
Rahul Tank
2024-02-14 17:47:30 +05:30
committed by Abhinav Kudnar
parent 3d0022adcd
commit 78f8373235
+3 -2
View File
@@ -43,7 +43,6 @@ ble_hs_periodic_sync_alloc(void)
memset(psync, 0, sizeof(*psync));
}
ble_npl_event_init(&psync->lost_ev, ble_gap_npl_sync_lost, psync);
return psync;
}
@@ -56,7 +55,9 @@ ble_hs_periodic_sync_free(struct ble_hs_periodic_sync *psync)
return;
}
ble_npl_event_deinit(&psync->lost_ev);
if((psync->lost_ev).event != NULL)
ble_npl_event_deinit(&psync->lost_ev);
#if MYNEWT_VAL(BLE_HS_DEBUG)
memset(psync, 0xff, sizeof *psync);
#endif