From ff724933c2f7afdd8b09b27c19bdb2742a3d28d1 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Sat, 11 May 2013 18:49:19 +0400 Subject: [PATCH] Request body: fixed r->count increment on allocation failure. --- src/http/ngx_http_request_body.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c index 2c612311d..7ca328791 100644 --- a/src/http/ngx_http_request_body.c +++ b/src/http/ngx_http_request_body.c @@ -152,7 +152,8 @@ ngx_http_read_client_request_body(ngx_http_request_t *r, cl = ngx_chain_get_free_buf(r->pool, &rb->free); if (cl == NULL) { - return NGX_HTTP_INTERNAL_SERVER_ERROR; + rc = NGX_HTTP_INTERNAL_SERVER_ERROR; + goto done; } b = cl->buf;