mirror of
https://github.com/nginx/nginx.git
synced 2025-06-12 05:11:37 +08:00
Removed extra allocation for r->uri.
The ngx_http_parse_complex_uri() function cannot make URI longer and does not null-terminate URI, so there is no need to allocate an extra byte. This allocation appears to be a leftover from changes in 461:a88a3e4e158f (0.1.5), where null-termination of r->uri and many other strings was removed.
This commit is contained in:
parent
ce9971b2b5
commit
2e94c81b0b
@ -1230,7 +1230,7 @@ ngx_http_process_request_uri(ngx_http_request_t *r)
|
||||
r->uri.len++;
|
||||
}
|
||||
|
||||
r->uri.data = ngx_pnalloc(r->pool, r->uri.len + 1);
|
||||
r->uri.data = ngx_pnalloc(r->pool, r->uri.len);
|
||||
if (r->uri.data == NULL) {
|
||||
ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
|
||||
return NGX_ERROR;
|
||||
|
Loading…
Reference in New Issue
Block a user