diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-11-20 17:08:29 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-11-20 17:08:29 +0300 |
commit | 6bbed85899d16b063df41ffc2cbf314402ad73e6 (patch) | |
tree | 79ac837f8c959bc19a7bb1beafaacf336681b7d7 /src/nxt_port_memory.c | |
parent | fa76ea700ff2326c929f9c9f5ff40915a41d0a89 (diff) | |
download | unit-6bbed85899d16b063df41ffc2cbf314402ad73e6.tar.gz unit-6bbed85899d16b063df41ffc2cbf314402ad73e6.tar.bz2 |
Fixing Coverity warnings.
CID 200496
CID 200494
CID 200490
CID 200489
CID 200483
CID 200482
CID 200472
CID 200465
Diffstat (limited to 'src/nxt_port_memory.c')
-rw-r--r-- | src/nxt_port_memory.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nxt_port_memory.c b/src/nxt_port_memory.c index 71ab1d60..9f27ab09 100644 --- a/src/nxt_port_memory.c +++ b/src/nxt_port_memory.c @@ -191,7 +191,6 @@ nxt_port_incoming_port_mmap(nxt_task_t *task, nxt_process_t *process, fd, process->pid); port_mmap = NULL; - hdr = NULL; if (fstat(fd, &mmap_stat) == -1) { nxt_log(task, NXT_LOG_WARN, "fstat(%FD) failed %E", fd, nxt_errno); @@ -214,6 +213,8 @@ nxt_port_incoming_port_mmap(nxt_task_t *task, nxt_process_t *process, if (nxt_slow_path(mmap_handler == NULL)) { nxt_log(task, NXT_LOG_WARN, "failed to allocate mmap_handler"); + nxt_mem_munmap(mem, PORT_MMAP_SIZE); + return NULL; } |