Mailing List Archive

r1991 - trunk/varnish-cache/bin/varnishd
Author: phk
Date: 2007-09-23 15:11:51 +0200 (Sun, 23 Sep 2007)
New Revision: 1991

Modified:
trunk/varnish-cache/bin/varnishd/cache_pool.c
Log:
When a workerthread dies of old age, make sure to nuke the mutex it may
have in its cached nobjhead.



Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c 2007-09-23 13:09:56 UTC (rev 1990)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2007-09-23 13:11:51 UTC (rev 1991)
@@ -256,8 +256,10 @@
AZ(close(w->pipe[1]));
if (w->srcaddr != NULL)
free(w->srcaddr);
- if (w->nobjhead != NULL)
+ if (w->nobjhead != NULL) {
+ MTX_DESTROY(&w->nobjhead->mtx);
FREE_OBJ(w->nobjhead);
+ }
if (w->nobj!= NULL)
FREE_OBJ(w->nobj);
return (NULL);