mirror of
https://github.com/nginx/nginx.git
synced 2024-12-02 20:09:01 +08:00
Proxy: use an appropriate error on memory allocation failure.
This commit is contained in:
parent
c238150a57
commit
5e5540f7dc
@ -812,7 +812,7 @@ ngx_http_proxy_handler(ngx_http_request_t *r)
|
|||||||
|
|
||||||
ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_proxy_ctx_t));
|
ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_proxy_ctx_t));
|
||||||
if (ctx == NULL) {
|
if (ctx == NULL) {
|
||||||
return NGX_ERROR;
|
return NGX_HTTP_INTERNAL_SERVER_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_http_set_ctx(r, ctx, ngx_http_proxy_module);
|
ngx_http_set_ctx(r, ctx, ngx_http_proxy_module);
|
||||||
|
Loading…
Reference in New Issue
Block a user