diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-17 20:42:28 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-17 20:42:28 -0400 |
commit | dd8eeabfd18f4a52eb85960701b914e4f89a00bf (patch) | |
tree | 6b8bfa3416a17f89748569b99cca72be072ce17a | |
parent | faf1242bed382f2f4508c1304ee2c1c5b7be7c09 (diff) | |
download | tor-dd8eeabfd18f4a52eb85960701b914e4f89a00bf.tar.gz tor-dd8eeabfd18f4a52eb85960701b914e4f89a00bf.zip |
Fix memory leak in tor-gencert.c
This was introduced in 4ff170d7b1cbe4074cb852, and is probably
unreachable, but coverity complained about it (CID 1417761). Bug not
in any released Tor, so no changes file.
-rw-r--r-- | src/tools/tor-gencert.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c index 600e2252d4..fb7465c0eb 100644 --- a/src/tools/tor-gencert.c +++ b/src/tools/tor-gencert.c @@ -464,8 +464,6 @@ generate_certificate(void) char expires[ISO_TIME_LEN+1]; char id_digest[DIGEST_LEN]; char fingerprint[FINGERPRINT_LEN+1]; - char *ident = key_to_string(identity_key); - char *signing = key_to_string(signing_key); FILE *f; size_t signed_len; char digest[DIGEST_LEN]; @@ -478,6 +476,8 @@ generate_certificate(void) if (get_digest(identity_key, id_digest)) { return -1; } + char *ident = key_to_string(identity_key); + char *signing = key_to_string(signing_key); tor_localtime_r(&now, &tm); tm.tm_mon += months_lifetime; |