Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
crypto: fix memory leak in Connection::New
Browse files Browse the repository at this point in the history
Do not create `SSL` instance twice, `SSL_new` is called from `SSLBase`
constructor anyway.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
  • Loading branch information
indutny committed Aug 23, 2014
1 parent c0f30f6 commit 8a7d7f8
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/node_crypto.cc
Expand Up @@ -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();

Expand Down

0 comments on commit 8a7d7f8

Please sign in to comment.