Fixed a potential descriptor leak if mmap() failed.
This commit is contained in:
@@ -318,6 +318,7 @@ nxt_port_new_port_mmap(nxt_task_t *task, nxt_port_mmaps_t *mmaps,
|
||||
MAP_SHARED, fd, 0);
|
||||
|
||||
if (nxt_slow_path(mem == MAP_FAILED)) {
|
||||
nxt_fd_close(fd);
|
||||
goto remove_fail;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user