rtc: disable interrupts in finalization

Don't leave interrupts enabled if chronyd is stopped when making an RTC
measurement.
This commit is contained in:
Miroslav Lichvar 2019-12-10 17:42:34 +01:00
parent d66b2f2b24
commit f5eb7daf20

View file

@ -566,6 +566,7 @@ RTC_Linux_Finalise(void)
/* Remove input file handler */ /* Remove input file handler */
if (fd >= 0) { if (fd >= 0) {
SCH_RemoveFileHandler(fd); SCH_RemoveFileHandler(fd);
switch_interrupts(0);
close(fd); close(fd);
/* Save the RTC data */ /* Save the RTC data */