]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: remove resolving timeout in finalization
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 19 Jun 2023 14:46:10 +0000 (16:46 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 20 Jun 2023 11:03:53 +0000 (13:03 +0200)
Don't assume NSR_Finalise() can be called only on exit when the
scheduler is finalized.

ntp_sources.c

index 152c41829d64812640fee31d32cd8169fdd5e0b4..7c2a99dde47efd6301a0d1e1d5b8937314794298 100644 (file)
@@ -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);