[master] 5927ca2 Call cleanup functions in correct order.

Poul-Henning Kamp phk at FreeBSD.org
Mon Jan 19 09:14:30 CET 2015


commit 5927ca2d94d097e35c18ea25f14e4856b3221020
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Jan 19 08:14:13 2015 +0000

    Call cleanup functions in correct order.
    
    Spotted by Coverity.

diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index faffadb..1fac6d8 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -352,8 +352,8 @@ vbe_dir_finish(const struct director *d, struct worker *wrk,
 		    bp->display_name);
 		Lck_Lock(&bp->mtx);
 		VSC_C_main->backend_recycle++;
-		VBE_DropRefLocked(bp, &bo->acct);
 		VBT_Recycle(bp->tcp_pool, &bo->htc->vbc);
+		VBE_DropRefLocked(bp, &bo->acct);
 	}
 	bo->htc->vbc = NULL;
 	bo->htc = NULL;



More information about the varnish-commit mailing list