Use only preallocated memory in ngx_readv_chain() (ticket #1408).
In d1bde5c3c5d2, the number of preallocated iovec's for ngx_readv_chain() was increased. Still, in some setups, the function might allocate memory for iovec's from a connection pool, which is only freed when closing the connection. The ngx_readv_chain() function was modified to use only preallocated memory, similarly to the ngx_writev_chain() change in 8e903522c17a.
This commit is contained in:
parent
eba1abc528
commit
1ed44c95f5
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ ngx_readv_chain(ngx_connection_t *c, ngx_chain_t *chain, off_t limit)
|
|||
iov->iov_len += n;
|
||||
|
||||
} else {
|
||||
if (vec.nelts >= IOV_MAX) {
|
||||
if (vec.nelts == vec.nalloc) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue