Commit d438ad82 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Only release VCL if we have one



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5481 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 0d9d06d0
......@@ -190,8 +190,10 @@ wrk_thread_real(struct wq *qp, unsigned shm_workspace, unsigned sess_workspace,
AZ(w->wfd);
assert(w->wlp == w->wlb);
w->wrq = NULL;
if (params->diag_bitmap & 0x00040000)
VCL_Rel(&w->vcl);
if (params->diag_bitmap & 0x00040000) {
if (w->vcl != NULL)
VCL_Rel(&w->vcl);
}
if (!Lck_Trylock(&wstat_mtx)) {
wrk_sumstat(w);
Lck_Unlock(&wstat_mtx);
......
......@@ -104,6 +104,7 @@ VCL_Rel(struct VCL_conf **vcc)
{
struct VCL_conf *vc;
AN(*vcc);
vc = *vcc;
*vcc = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment