diff -r e70418bb14b1 -r 76ccfc2a932f src/server/daemon/webserver.c
--- a/src/server/daemon/webserver.c	Thu Jan 30 18:19:12 2025 +0100
+++ b/src/server/daemon/webserver.c	Thu Jan 30 18:29:30 2025 +0100
@@ -290,11 +290,16 @@
     
     // execute restart callbacks
     RestartCallback *re = atrestart;
+    RestartCallback *re_next;
     while(re) {
         re->func(re->data);
-        re = re->next;
+        re_next = re->next;
+        free(re);
+        re = re_next;
     }
     
+    resource_pool_cleanup();
+    
     webserver_destroy();
 }