Klaus Demo nginx / d21e644
Request body: free chain links in ngx_http_write_request_body(). Maxim Dounin 7 years ago
1 changed file(s) with 7 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
414414 ngx_http_write_request_body(ngx_http_request_t *r)
415415 {
416416 ssize_t n;
417 ngx_chain_t *cl;
417 ngx_chain_t *cl, *ln;
418418 ngx_temp_file_t *tf;
419419 ngx_http_request_body_t *rb;
420420 ngx_http_core_loc_conf_t *clcf;
477477
478478 /* mark all buffers as written */
479479
480 for (cl = rb->bufs; cl; cl = cl->next) {
480 for (cl = rb->bufs; cl; /* void */) {
481
481482 cl->buf->pos = cl->buf->last;
483
484 ln = cl;
485 cl = cl->next;
486 ngx_free_chain(r->pool, ln);
482487 }
483488
484489 rb->bufs = NULL;