From 497faf1b9abb188cab40c389a9e6221add5dd496 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 28 Dec 2017 16:01:06 +0300 Subject: Changed nxt_mp_retain() and nxt_mp_release() interfaces. --- src/nxt_port_memory.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/nxt_port_memory.c') diff --git a/src/nxt_port_memory.c b/src/nxt_port_memory.c index 3a1ec198..7be4347a 100644 --- a/src/nxt_port_memory.c +++ b/src/nxt_port_memory.c @@ -173,7 +173,8 @@ release_buf: nxt_port_mmap_handler_use(mmap_handler, -1); - nxt_mp_release(mp, b); + nxt_mp_free(mp, b); + nxt_mp_release(mp); } @@ -588,6 +589,7 @@ nxt_buf_t * nxt_port_mmap_get_buf(nxt_task_t *task, nxt_port_t *port, size_t size) { size_t nchunks; + nxt_mp_t *mp; nxt_buf_t *b; nxt_chunk_id_t c; nxt_port_mmap_header_t *hdr; @@ -605,7 +607,9 @@ nxt_port_mmap_get_buf(nxt_task_t *task, nxt_port_t *port, size_t size) mmap_handler = nxt_port_mmap_get(task, port, &c, 0); if (nxt_slow_path(mmap_handler == NULL)) { - nxt_mp_release(task->thread->engine->mem_pool, b); + mp = task->thread->engine->mem_pool; + nxt_mp_free(mp, b); + nxt_mp_release(mp); return NULL; } -- cgit