[master] 691e883 Release the storage of the cached req.body when the request is done.
Poul-Henning Kamp
phk at varnish-cache.org
Wed Jan 23 12:09:19 CET 2013
commit 691e88392986f0d7b783e4217be5e9f3b40d2faa
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Jan 23 11:09:03 2013 +0000
Release the storage of the cached req.body when the request is done.
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index 982e9de..2bb15cd 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -1186,6 +1186,7 @@ enum req_fsm_nxt
CNT_Request(struct worker *wrk, struct req *req)
{
enum req_fsm_nxt nxt;
+ struct storage *st;
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
@@ -1246,6 +1247,12 @@ CNT_Request(struct worker *wrk, struct req *req)
req->t_resp - req->t_req,
req->sp->t_idle - req->t_resp);
+ while (!VTAILQ_EMPTY(&req->body)) {
+ st = VTAILQ_FIRST(&req->body);
+ VTAILQ_REMOVE(&req->body, st, list);
+ STV_free(st);
+ }
+
/* done == 2 was charged by cache_hash.c */
SES_Charge(wrk, req);
More information about the varnish-commit
mailing list