[master] 6cbd4c852 We might as well clean up the witness memory, when it is this easy.
    Poul-Henning Kamp 
    phk at FreeBSD.org
       
    Mon Feb 22 13:27:07 UTC 2021
    
    
  
commit 6cbd4c852415ed21ad2e741588dc852627813a67
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Feb 22 13:26:09 2021 +0000
    We might as well clean up the witness memory, when it is this easy.
    
    Spotted by: Rasmus Villemoes
diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index e9d2da664..1581f950d 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -350,7 +350,7 @@ child_main(int sigmagic, size_t altstksz)
 
 	AZ(pthread_key_create(&req_key, NULL));
 	AZ(pthread_key_create(&bo_key, NULL));
-	AZ(pthread_key_create(&witness_key, NULL));
+	AZ(pthread_key_create(&witness_key, free));
 	AZ(pthread_key_create(&name_key, NULL));
 
 	THR_SetName("cache-main");
    
    
More information about the varnish-commit
mailing list