aboutsummaryrefslogtreecommitdiff
path: root/src/lib/tls/tortls_openssl.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-04 19:41:59 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-04 19:45:28 -0400
commitd644c93ae9373f99d95870c7b752b790f8714201 (patch)
tree542b703b6405b704ddbf6354f76d97a05320903a /src/lib/tls/tortls_openssl.c
parentc50537fd9462af45f0a53aa4f0d5ca03a08fc41e (diff)
downloadtor-d644c93ae9373f99d95870c7b752b790f8714201.tar.gz
tor-d644c93ae9373f99d95870c7b752b790f8714201.zip
Resolve openssl-only memory leaks
Diffstat (limited to 'src/lib/tls/tortls_openssl.c')
-rw-r--r--src/lib/tls/tortls_openssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/tls/tortls_openssl.c b/src/lib/tls/tortls_openssl.c
index 370e7e4367..9371c9393f 100644
--- a/src/lib/tls/tortls_openssl.c
+++ b/src/lib/tls/tortls_openssl.c
@@ -609,7 +609,7 @@ tor_tls_context_new(crypto_pk_t *identity, unsigned int key_lifetime,
if (result->my_id_cert) {
X509_STORE *s = SSL_CTX_get_cert_store(result->ctx);
tor_assert(s);
- X509_STORE_add_cert(s, X509_dup(result->my_id_cert->cert));
+ X509_STORE_add_cert(s, result->my_id_cert->cert);
}
}
SSL_CTX_set_session_cache_mode(result->ctx, SSL_SESS_CACHE_OFF);