[master] 9dd5d27 Don't leak struct req if we cannot restart it from a waiting list.

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 1 09:35:40 CEST 2014


commit 9dd5d273b6b5aa44705778033701ff04be79bcf9
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 1 07:35:16 2014 +0000

    Don't leak struct req if we cannot restart it from a waiting list.
    
    Fixes: #1466

diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index 753a646..9bcc322 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -534,9 +534,9 @@ hsh_rush(struct dstat *ds, struct objhead *oh)
 		DSL(DBG_WAITINGLIST, req->vsl->wid, "off waiting list");
 		if (SES_ScheduleReq(req)) {
 			/*
-			 * We could not schedule the session, leave the
-			 * rest on the busy list.
+			 * We could not schedule the session, put it back.
 			 */
+			VTAILQ_INSERT_HEAD(&wl->list, req, w_list);
 			break;
 		}
 	}



More information about the varnish-commit mailing list