summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_router.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-12-28 20:08:15 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-12-28 20:08:15 +0300
commitecba3d80f942ae89cf168753e75faf6715e75d1a (patch)
tree3d6139b0cf94fa2a6d2b926b8100ece8f275f93e /src/nxt_router.c
parentea403782069c10c06c453d325f84aca26435b1bd (diff)
downloadunit-ecba3d80f942ae89cf168753e75faf6715e75d1a.tar.gz
unit-ecba3d80f942ae89cf168753e75faf6715e75d1a.tar.bz2
Fixing memory leak introduced in changeset 5817734dd9b9.
Diffstat (limited to 'src/nxt_router.c')
-rw-r--r--src/nxt_router.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nxt_router.c b/src/nxt_router.c
index 54e70a1a..a09dd498 100644
--- a/src/nxt_router.c
+++ b/src/nxt_router.c
@@ -2451,7 +2451,10 @@ nxt_router_response_ready_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg,
goto fail;
}
- if (nxt_buf_mem_used_size(&b->mem) != 0) {
+ if (nxt_buf_mem_used_size(&b->mem) == 0) {
+ nxt_work_queue_add(&task->thread->engine->fast_work_queue,
+ b->completion_handler, task, b, b->parent);
+ } else {
nxt_buf_chain_add(&r->out, b);
}