]> err.no Git - varnish/commitdiff
When a workerthread dies of old age, make sure to nuke the mutex it may
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 23 Sep 2007 13:11:51 +0000 (13:11 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 23 Sep 2007 13:11:51 +0000 (13:11 +0000)
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

index 3bdbc3989448025796e9306884d2c6e170f221cb..459cf669429c9bad3c1c6d7273f668f6e1946e50 100644 (file)
@@ -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);