diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-09-07 17:24:56 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-09-07 17:24:56 +0200 |
commit | 047d69c4eb2cefe9bab654fb570592d3863da792 (patch) | |
tree | 1aa5a0957501bc6bf901af3843f265954b1ed966 /curvetun.c | |
parent | f472d90b141d0e9f0c1033012d6d2be1338b7b1f (diff) |
curvetun: Fix issues detected by the Coverity scanner
Fix two issues detected by the Coverity scanner (CID 991819 & CID
991822)
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'curvetun.c')
-rw-r--r-- | curvetun.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)); |