From: phk Date: Sun, 23 Sep 2007 13:11:51 +0000 (+0000) Subject: When a workerthread dies of old age, make sure to nuke the mutex it may X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00759bf4d34c72df2976f4a91c0bf38acf303576;p=varnish 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 --- 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);