Nimble: Removed extra npl_event_init being done during

periodic_sync_alloc
This commit is contained in:
Rahul Tank
2022-07-05 10:34:48 +05:30
parent eda98ca8fa
commit 3df0d20de8
+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