Skip to content
Snippets Groups Projects
Commit 72c4a4eb authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Fix a harmless memory leak in tor-gencert

parent e8db9d0c
Branches
Tags
No related merge requests found
......@@ -186,8 +186,7 @@ parse_commandline(int argc, char **argv)
return 1;
in.s_addr = htonl(addr);
tor_inet_ntoa(&in, b, sizeof(b));
address = tor_malloc(INET_NTOA_BUF_LEN+32);
tor_snprintf(address, INET_NTOA_BUF_LEN+32, "%s:%d", b, (int)port);
tor_asprintf(&address, "%s:%d", b, (int)port);
} else if (!strcmp(argv[i], "--create-identity-key")) {
make_new_id = 1;
} else if (!strcmp(argv[i], "--passphrase-fd")) {
......@@ -566,6 +565,7 @@ main(int argc, char **argv)
tor_free(identity_key_file);
tor_free(signing_key_file);
tor_free(certificate_file);
tor_free(address);
crypto_global_cleanup();
return r;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment