mirror of
https://github.com/nginx/nginx.git
synced 2024-11-21 16:28:40 +00:00
fix segfault when connect() failed
This commit is contained in:
parent
f4eb017333
commit
0de2e655cf
@ -182,7 +182,10 @@ ngx_imap_auth_http_init(ngx_imap_session_t *s)
|
||||
rc = ngx_event_connect_peer(&ctx->peer);
|
||||
|
||||
if (rc == NGX_ERROR || rc == NGX_BUSY || rc == NGX_DECLINED) {
|
||||
ngx_close_connection(ctx->peer.connection);
|
||||
if (ctx->peer.connection) {
|
||||
ngx_close_connection(ctx->peer.connection);
|
||||
}
|
||||
|
||||
ngx_destroy_pool(ctx->pool);
|
||||
ngx_imap_session_internal_server_error(s);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user