File tree Expand file tree Collapse file tree 7 files changed +20
-7
lines changed Expand file tree Collapse file tree 7 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -185,13 +185,11 @@ LCL_Initialise(void)
185
185
void
186
186
LCL_Finalise (void )
187
187
{
188
- while (change_list .next != & change_list )
189
- LCL_RemoveParameterChangeHandler (change_list .next -> handler ,
190
- change_list .next -> anything );
191
-
192
- while (dispersion_notify_list .next != & dispersion_notify_list )
193
- LCL_RemoveDispersionNotifyHandler (dispersion_notify_list .next -> handler ,
194
- dispersion_notify_list .next -> anything );
188
+ /* Make sure all handlers have been removed */
189
+ if (change_list .next != & change_list )
190
+ assert (0 );
191
+ if (dispersion_notify_list .next != & dispersion_notify_list )
192
+ assert (0 );
195
193
}
196
194
197
195
/* ================================================== */
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ MNL_Initialise(void)
92
92
void
93
93
MNL_Finalise (void )
94
94
{
95
+ LCL_RemoveParameterChangeHandler (slew_samples , NULL );
95
96
}
96
97
97
98
/* ================================================== */
Original file line number Diff line number Diff line change @@ -185,6 +185,8 @@ NSR_Finalise(void)
185
185
clean_source_record (record );
186
186
}
187
187
188
+ LCL_RemoveParameterChangeHandler (slew_sources , NULL );
189
+
188
190
ARR_DestroyInstance (records );
189
191
ARR_DestroyInstance (pools );
190
192
Original file line number Diff line number Diff line change @@ -304,6 +304,8 @@ REF_Finalise(void)
304
304
update_drift_file (LCL_ReadAbsoluteFrequency (), our_skew );
305
305
}
306
306
307
+ LCL_RemoveParameterChangeHandler (handle_slew , NULL );
308
+
307
309
Free (fb_drifts );
308
310
309
311
initialised = 0 ;
Original file line number Diff line number Diff line change @@ -573,6 +573,10 @@ RTC_Linux_Finalise(void)
573
573
(void ) RTC_Linux_WriteParameters ();
574
574
575
575
}
576
+
577
+ if (rtc_sec )
578
+ LCL_RemoveParameterChangeHandler (slew_samples , NULL );
579
+
576
580
Free (rtc_sec );
577
581
Free (rtc_trim );
578
582
Free (system_times );
Original file line number Diff line number Diff line change @@ -272,6 +272,10 @@ void SMT_Initialise(void)
272
272
273
273
void SMT_Finalise (void )
274
274
{
275
+ if (!enabled )
276
+ return ;
277
+
278
+ LCL_RemoveParameterChangeHandler (handle_slew , NULL );
275
279
}
276
280
277
281
int SMT_IsEnabled (void )
Original file line number Diff line number Diff line change @@ -417,6 +417,8 @@ SYS_Generic_Finalise(void)
417
417
418
418
LCL_ReadRawTime (& now );
419
419
stop_fastslew (& now );
420
+
421
+ LCL_RemoveParameterChangeHandler (handle_step , NULL );
420
422
}
421
423
422
424
/* ================================================== */
You can’t perform that action at this time.
0 commit comments