[master] varnish-3.0.0-beta1-80-g94fe195

Poul-Henning Kamp phk at varnish-cache.org
Fri May 27 15:00:10 CEST 2011


commit 94fe1956a596430501a6fe4100d998007f3b4215
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri May 27 12:46:51 2011 +0000

    If we cannot allocate an object in cnt_error() just close and go
    to cnt_done(), there is nothing we can do.
    
    For some inderterminate value of "fixes" this...
    
    Fixes	#924

diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c
index 13a0bd3..5b19c3e 100644
--- a/bin/varnishd/cache_center.c
+++ b/bin/varnishd/cache_center.c
@@ -415,7 +415,12 @@ cnt_error(struct sess *sp)
 		EXP_Clr(&w->exp);
 		sp->obj = STV_NewObject(sp, NULL, 1024, &w->exp,
 		     params->http_max_hdr);
-		XXXAN(sp->obj);
+		if (sp->obj == NULL) {
+			sp->doclose = "Out of objects";
+			sp->step = STP_DONE;
+			return(0);
+		}
+		AN(sp->obj);
 		sp->obj->xid = sp->xid;
 		sp->obj->entered = sp->t_req;
 	} else {



More information about the varnish-commit mailing list