summaryrefslogtreecommitdiff
path: root/curvetun.c
diff options
context:
space:
mode:
Diffstat (limited to 'curvetun.c')
-rw-r--r--curvetun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/curvetun.c b/curvetun.c
index 52bfb44..7507a75 100644
--- a/curvetun.c
+++ b/curvetun.c
@@ -328,7 +328,7 @@ static void check_config_keypair_or_die(char *home)
if (fd < 0) {
err = EIO;
errstr = "Cannot open privkey file!\n";
- goto out;
+ goto out_noclose;
}
ret = read(fd, secretkey, sizeof(secretkey));
@@ -368,7 +368,7 @@ static void check_config_keypair_or_die(char *home)
}
out:
close(fd);
-
+out_noclose:
xmemset(publickey, 0, sizeof(publickey));
xmemset(publicres, 0, sizeof(publicres));
xmemset(secretkey, 0, sizeof(secretkey));