[master] 761f240 Another protective assert

Poul-Henning Kamp phk at FreeBSD.org
Mon Jan 6 21:18:44 CET 2014


commit 761f240e849c07a9b6bcdaef76ad01f820e6348f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Jan 6 20:18:29 2014 +0000

    Another protective assert
    
    (and a typo)

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index a33f152..f251074 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -749,6 +749,7 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,
 	if (oldobj != NULL) {
 		if (http_GetHdr(oldobj->http, H_Last_Modified, NULL) ||
 		   http_GetHdr(oldobj->http, H_ETag, NULL)) {
+			assert(oldobj->objcore->refcnt > 0);
 			HSH_Ref(oldobj->objcore);
 			bo->ims_obj = oldobj;
 		}
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index 07436cf..5bc4a71 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -434,7 +434,7 @@ cnt_lookup(struct worker *wrk, struct req *req)
 		else {
 			/*
 			 * We don't have a busy object, so treat this
-			 * lige a pass
+			 * like a pass
 			 */
 			VSLb(req->vsl, SLT_VCL_Error,
 			    "vcl_hit{} returns fetch without busy object."



More information about the varnish-commit mailing list