Commit 691e8839 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Release the storage of the cached req.body when the request is done.

parent b2930e5d
...@@ -1186,6 +1186,7 @@ enum req_fsm_nxt ...@@ -1186,6 +1186,7 @@ enum req_fsm_nxt
CNT_Request(struct worker *wrk, struct req *req) CNT_Request(struct worker *wrk, struct req *req)
{ {
enum req_fsm_nxt nxt; enum req_fsm_nxt nxt;
struct storage *st;
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
...@@ -1246,6 +1247,12 @@ CNT_Request(struct worker *wrk, struct req *req) ...@@ -1246,6 +1247,12 @@ CNT_Request(struct worker *wrk, struct req *req)
req->t_resp - req->t_req, req->t_resp - req->t_req,
req->sp->t_idle - req->t_resp); 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 */ /* done == 2 was charged by cache_hash.c */
SES_Charge(wrk, req); SES_Charge(wrk, req);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment