diff -r 5c31cc844c68 -r 4f5ccaea4a92 src/server/daemon/log.c
--- a/src/server/daemon/log.c	Fri Jan 31 21:27:54 2025 +0100
+++ b/src/server/daemon/log.c	Sat Feb 01 09:23:14 2025 +0100
@@ -415,3 +415,15 @@
     return log;
 }
 
+void shutdown_logging(void) {
+    CxIterator i = cxMapIteratorValues(access_log_files);
+    cx_foreach(LogFile *, log, i) {
+        fclose(log->file);
+        free(log);
+    }
+    cxMapDestroy(access_log_files);
+    
+    if(log_dup_list) {
+        cxListDestroy(log_dup_list);
+    } 
+}