diff options
Diffstat (limited to '')
-rw-r--r-- | src/nxt_http_request.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nxt_http_request.c b/src/nxt_http_request.c index 394411a9..d40393b7 100644 --- a/src/nxt_http_request.c +++ b/src/nxt_http_request.c @@ -483,15 +483,20 @@ nxt_http_buf_mem(nxt_task_t *task, nxt_http_request_t *r, size_t size) static void nxt_http_request_mem_buf_completion(nxt_task_t *task, void *obj, void *data) { - nxt_buf_t *b; + nxt_buf_t *b, *next; nxt_http_request_t *r; b = obj; r = data; - nxt_mp_free(r->mem_pool, b); + do { + next = b->next; - nxt_mp_release(r->mem_pool); + nxt_mp_free(r->mem_pool, b); + nxt_mp_release(r->mem_pool); + + b = next; + } while (b != NULL); } |