mirror of
https://github.com/nginx/nginx.git
synced 2026-07-10 19:04:51 +00:00
Auth basic: fixed file descriptor leak on memory allocation error.
Found by Coverity (CID 1662016).
This commit is contained in:
parent
251444fcf4
commit
034f15bbc2
1 changed files with 2 additions and 1 deletions
|
|
@ -253,7 +253,8 @@ ngx_http_auth_basic_handler(ngx_http_request_t *r)
|
|||
pwd.len = i - passwd;
|
||||
pwd.data = ngx_pnalloc(r->pool, pwd.len + 1);
|
||||
if (pwd.data == NULL) {
|
||||
return NGX_HTTP_INTERNAL_SERVER_ERROR;
|
||||
rc = NGX_HTTP_INTERNAL_SERVER_ERROR;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ngx_cpystrn(pwd.data, &buf[passwd], pwd.len + 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue