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 <fedor@indutny.com>
This commit is contained in:
parent
c0f30f6058
commit
8a7d7f8b2b
@ -2111,7 +2111,6 @@ void Connection::New(const FunctionCallbackInfo<Value>& args) {
|
||||
SSLWrap<Connection>::Kind kind =
|
||||
is_server ? SSLWrap<Connection>::kServer : SSLWrap<Connection>::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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user