summaryrefslogtreecommitdiff
path: root/src/common/crypto.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-02-05 19:40:26 +0000
committerNick Mathewson <nickm@torproject.org>2008-02-05 19:40:26 +0000
commita51deb9a9c7bf33ba353e008724c150bddde144b (patch)
tree5797a9e4129ba027269bb48f4e3d4571f98fe473 /src/common/crypto.c
parent2866c53eec8cd592955f15cec1a317e04aaafc7f (diff)
downloadtor-a51deb9a9c7bf33ba353e008724c150bddde144b.tar.gz
tor-a51deb9a9c7bf33ba353e008724c150bddde144b.zip
r17903@catbus: nickm | 2008-02-05 14:40:03 -0500
Remove some dead code; fix some XXX020s; turn some XXX020s into XXXX_IP6s (i.e., "needs to be fixed when we add ipv6 support"). svn:r13382
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r--src/common/crypto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 6f7ffd3f58..a13fc92ba2 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -487,7 +487,7 @@ crypto_pk_write_public_key_to_string(crypto_pk_env_t *env, char **dest,
*/
if (!PEM_write_bio_RSAPublicKey(b, env->key)) {
crypto_log_errors(LOG_WARN, "writing public key to string");
- /* XXX020 leaks b? maybe "BIO_free(b);" would be smart here. -RD */
+ BIO_free(b);
return -1;
}
@@ -1277,7 +1277,7 @@ void
crypto_digest_get_digest(crypto_digest_env_t *digest,
char *out, size_t out_len)
{
- static unsigned char r[DIGEST_LEN]; /*XXXXX020 why static? */
+ unsigned char r[DIGEST_LEN];
SHA_CTX tmpctx;
tor_assert(digest);
tor_assert(out);