Fixing leakage caused by incorrect in_hash flag cleanup.
Large-bodied requests are added to the request hash to be found when the body arrives. However, changeset 1d84b9e4b459 introduced a bug: the 'in_hash' flag, used to remove the request from the hash at request release, was cleared after the first successful request lookup. As a result, the entry was never removed.
This commit is contained in:
@@ -6202,7 +6202,9 @@ nxt_unit_request_hash_find(nxt_unit_ctx_t *ctx, uint32_t stream, int remove)
|
|||||||
case NXT_OK:
|
case NXT_OK:
|
||||||
req_impl = nxt_container_of(lhq.value, nxt_unit_request_info_impl_t,
|
req_impl = nxt_container_of(lhq.value, nxt_unit_request_info_impl_t,
|
||||||
req);
|
req);
|
||||||
|
if (remove) {
|
||||||
req_impl->in_hash = 0;
|
req_impl->in_hash = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return lhq.value;
|
return lhq.value;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user