summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-09-07 18:17:16 +0200
committerTobias Klauser <tklauser@distanz.ch>2015-09-07 18:18:53 +0200
commit186b116bec11cb941ed91547c9f612b96c96341b (patch)
treee1c836620c714bcdca219e2ba1eb022217305386
parent047d69c4eb2cefe9bab654fb570592d3863da792 (diff)
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 <tklauser@distanz.ch>
-rw-r--r--curvetun.c2
1 files changed, 1 insertions, 1 deletions
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));