From 8a7d7f8b2b40f670d2fceb14d7d16cda1bea6bcf Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sat, 23 Aug 2014 23:22:23 +0400 Subject: [PATCH] crypto: fix memory leak in Connection::New Do not create `SSL` instance twice, `SSL_new` is called from `SSLBase` constructor anyway. Reviewed-By: Fedor Indutny --- src/node_crypto.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 03c2d25..9fa1e2c 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -2111,7 +2111,6 @@ void Connection::New(const FunctionCallbackInfo& args) { SSLWrap::Kind kind = is_server ? SSLWrap::kServer : SSLWrap::kClient; Connection* conn = new Connection(env, args.This(), sc, kind); - conn->ssl_ = SSL_new(sc->ctx_); conn->bio_read_ = NodeBIO::New(); conn->bio_write_ = NodeBIO::New(); -- 2.7.4