From c721a5378dd467054f672a40e677be56bad53c4d Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 29 Sep 2020 22:57:56 +0300 Subject: [PATCH] Fixing request buffer memory leakage in router. The issue was introduced in changeset 1d84b9e4b459. The request buffer was transferred via the shared application queue, but the buffer position and the 'sent' flag were not updated after the buffer had been sent. --- src/nxt_router.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nxt_router.c b/src/nxt_router.c index b7408c3c..a3218047 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -4941,6 +4941,9 @@ nxt_router_app_prepare_request(nxt_task_t *task, nxt_debug(task, "queue is not empty"); } + buf->is_port_mmap_sent = 1; + buf->mem.pos = buf->mem.free; + } else { nxt_alert(task, "stream #%uD, app '%V': failed to send app message", req_rpc_data->stream, &app->name);