diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-04-12 05:27:38 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-04-12 05:27:38 +0000 |
commit | 306adfc8bdfd59c6c90d616c24404208f4516f12 (patch) | |
tree | ae57daa9be0cc73e24d938b587c63c8436bf4b31 /src | |
parent | 1dbf61e7e67a016b65549e7cf265d65cb5f2e21c (diff) | |
download | tor-306adfc8bdfd59c6c90d616c24404208f4516f12.tar tor-306adfc8bdfd59c6c90d616c24404208f4516f12.tar.gz |
Fix two dumb leaks in crypto.c
svn:r1592
Diffstat (limited to 'src')
-rw-r--r-- | src/common/crypto.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index 278fe1ded..88330892b 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -351,6 +351,7 @@ int crypto_pk_read_public_key_from_string(crypto_pk_env_t *env, const char *src, if (env->key) RSA_free(env->key); env->key = PEM_read_bio_RSAPublicKey(b, NULL, NULL, NULL); + BIO_free(b); if(!env->key) return -1; @@ -708,6 +709,7 @@ int crypto_pk_get_digest(crypto_pk_env_t *pk, char *digest_out) free(buf); return -1; } + free(buf); return 0; } |