mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Fix memory leak in tor-gencert.c
This was introduced in 4ff170d7b1
, and is probably
unreachable, but coverity complained about it (CID 1417761). Bug not
in any released Tor, so no changes file.
This commit is contained in:
parent
faf1242bed
commit
dd8eeabfd1
@ -464,8 +464,6 @@ generate_certificate(void)
|
|||||||
char expires[ISO_TIME_LEN+1];
|
char expires[ISO_TIME_LEN+1];
|
||||||
char id_digest[DIGEST_LEN];
|
char id_digest[DIGEST_LEN];
|
||||||
char fingerprint[FINGERPRINT_LEN+1];
|
char fingerprint[FINGERPRINT_LEN+1];
|
||||||
char *ident = key_to_string(identity_key);
|
|
||||||
char *signing = key_to_string(signing_key);
|
|
||||||
FILE *f;
|
FILE *f;
|
||||||
size_t signed_len;
|
size_t signed_len;
|
||||||
char digest[DIGEST_LEN];
|
char digest[DIGEST_LEN];
|
||||||
@ -478,6 +476,8 @@ generate_certificate(void)
|
|||||||
if (get_digest(identity_key, id_digest)) {
|
if (get_digest(identity_key, id_digest)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
char *ident = key_to_string(identity_key);
|
||||||
|
char *signing = key_to_string(signing_key);
|
||||||
|
|
||||||
tor_localtime_r(&now, &tm);
|
tor_localtime_r(&now, &tm);
|
||||||
tm.tm_mon += months_lifetime;
|
tm.tm_mon += months_lifetime;
|
||||||
|
Loading…
Reference in New Issue
Block a user