Welcome! Log In Create A New Profile

Advanced

[njs] Fixed double close in njs_ftw() introduced in 5a80b43b7098.

Dmitry Volyntsev
August 28, 2020 07:54AM
details: https://hg.nginx.org/njs/rev/0a5145a78a36
branches:
changeset: 1510:0a5145a78a36
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Fri Aug 28 11:47:50 2020 +0000
description:
Fixed double close in njs_ftw() introduced in 5a80b43b7098.

This correctly fixes Coverity CID 1465877.

diffstat:

src/njs_fs.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r fa50cc5b1128 -r 0a5145a78a36 src/njs_fs.c
--- a/src/njs_fs.c Thu Aug 27 14:43:23 2020 +0000
+++ b/src/njs_fs.c Fri Aug 28 11:47:50 2020 +0000
@@ -1366,8 +1366,9 @@ njs_ftw(char *path, njs_file_tree_walk_c
}
}

- closedir(d);
+ (void) closedir(d);
d = NULL;
+ dfd = -1;
}

path[len] = '\0';
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Fixed double close in njs_ftw() introduced in 5a80b43b7098.

Dmitry Volyntsev 91 August 28, 2020 07:54AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 59
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready