From e0b75b87bf2b9e24a0854356c3da3b72aaaae96e Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 19 Jun 2023 16:46:10 +0200 Subject: [PATCH] ntp: remove resolving timeout in finalization Don't assume NSR_Finalise() can be called only on exit when the scheduler is finalized. --- ntp_sources.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ntp_sources.c b/ntp_sources.c index 152c418..7c2a99d 100644 --- a/ntp_sources.c +++ b/ntp_sources.c @@ -187,6 +187,7 @@ void NSR_Initialise(void) { n_sources = 0; + resolving_id = 0; initialised = 1; records = ARR_CreateInstance(sizeof (SourceRecord)); @@ -209,6 +210,7 @@ NSR_Finalise(void) ARR_DestroyInstance(records); ARR_DestroyInstance(pools); + SCH_RemoveTimeout(resolving_id); while (unresolved_sources) remove_unresolved_source(unresolved_sources);