summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_request.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2020-03-12 17:54:24 +0300
committerMax Romanov <max.romanov@nginx.com>2020-03-12 17:54:24 +0300
commit08b65721e25b1b94affc12078a623a11341525d1 (patch)
treef616c45376b01622c715169551135d6a6f89c92f /src/nxt_http_request.c
parent0b5aabfc3f6dafa00d4cd4da595bceeefd1a1d27 (diff)
downloadunit-08b65721e25b1b94affc12078a623a11341525d1.tar.gz
unit-08b65721e25b1b94affc12078a623a11341525d1.tar.bz2
Moving request memory pool retain call after RPC data allocation.
If the call is done only after a successful RPC data allocation, its corresponding release call is not missed, which avoids a potential leak.
Diffstat (limited to 'src/nxt_http_request.c')
-rw-r--r--src/nxt_http_request.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/nxt_http_request.c b/src/nxt_http_request.c
index d610f65d..51553f0c 100644
--- a/src/nxt_http_request.c
+++ b/src/nxt_http_request.c
@@ -326,18 +326,8 @@ nxt_http_action_t *
nxt_http_application_handler(nxt_task_t *task, nxt_http_request_t *r,
nxt_http_action_t *action)
{
- nxt_event_engine_t *engine;
-
nxt_debug(task, "http application handler");
- nxt_mp_retain(r->mem_pool);
-
- engine = task->thread->engine;
- r->timer.task = &engine->task;
- r->timer.work_queue = &engine->fast_work_queue;
- r->timer.log = engine->task.log;
- r->timer.bias = NXT_TIMER_DEFAULT_BIAS;
-
/*
* TODO: need an application flag to get local address
* required by "SERVER_ADDR" in Pyhton and PHP. Not used in Go.