From 00759bf4d34c72df2976f4a91c0bf38acf303576 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 23 Sep 2007 13:11:51 +0000 Subject: [PATCH] When a workerthread dies of old age, make sure to nuke the mutex it may have in its cached nobjhead. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1991 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_pool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/varnish-cache/bin/varnishd/cache_pool.c b/varnish-cache/bin/varnishd/cache_pool.c index 3bdbc398..459cf669 100644 --- a/varnish-cache/bin/varnishd/cache_pool.c +++ b/varnish-cache/bin/varnishd/cache_pool.c @@ -256,8 +256,10 @@ wrk_thread(void *priv) 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); -- 2.39.5