Fixing Coverity warnings.

CID 200496
CID 200494
CID 200490
CID 200489
CID 200483
CID 200482
CID 200472
CID 200465
This commit is contained in:
Max Romanov
2017-11-20 17:08:29 +03:00
parent fa76ea700f
commit 6bbed85899
7 changed files with 23 additions and 10 deletions

View File

@@ -299,6 +299,8 @@ nxt_process_daemon(nxt_task_t *task)
nxt_pid_t pid;
const char *msg;
fd = -1;
/*
* fork() followed by a parent process's exit() detaches a child process
* from an init script or terminal shell process which has started the
@@ -372,6 +374,10 @@ fail:
nxt_log(task, NXT_LOG_CRIT, msg, nxt_errno);
if (fd != -1) {
nxt_fd_close(fd);
}
return NXT_ERROR;
}