[4.0] f0994a0 Don't leak struct req if we cannot restart it from a waiting list.

Lasse Karstensen lkarsten at varnish-software.com
Mon Sep 22 16:38:25 CEST 2014


commit f0994a0bf0bc165fafbd8fc128b4aa1d0d6fe541
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 73acf01..76ad5c3 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -537,9 +537,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