From 186b116bec11cb941ed91547c9f612b96c96341b Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 7 Sep 2015 18:17:16 +0200 Subject: curvetun: Don't attempt to close negative file descriptor Complete fix for Coverity issue CID 991822, commit 047d69c4e ("curvetun: Fix issues detected by the Coverity scanner") only fixed one instance of this issue. Signed-off-by: Tobias Klauser --- curvetun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curvetun.c b/curvetun.c index 7507a75..6523737 100644 --- a/curvetun.c +++ b/curvetun.c @@ -347,7 +347,7 @@ static void check_config_keypair_or_die(char *home) if (fd < 0) { err = EIO; errstr = "Cannot open pubkey file!\n"; - goto out; + goto out_noclose; } ret = read(fd, publickey, sizeof(publickey)); -- cgit v1.2.3-54-g00ecf