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

Commit

Permalink
crypto: don't touch ssl_ in Connection
Browse files Browse the repository at this point in the history
`ssl_` is a property of SSLWrap class, don't touch it, and definitely
don't zero it in constructor.
  • Loading branch information
indutny committed Aug 19, 2013
1 parent b9a0eb0 commit 306f863
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/node_crypto.h
Expand Up @@ -267,19 +267,13 @@ class Connection : public SSLWrap<Connection>, public ObjectWrap {
: SSLWrap<Connection>(sc, kind),
hello_offset_(0) {
bio_read_ = bio_write_ = NULL;
ssl_ = NULL;
hello_parser_.Start(SSLWrap<Connection>::OnClientHello,
OnClientHelloParseEnd,
this);
enable_session_callbacks();
}

~Connection() {
if (ssl_ != NULL) {
SSL_free(ssl_);
ssl_ = NULL;
}

#ifdef SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
sniObject_.Dispose();
sniContext_.Dispose();
Expand Down

0 comments on commit 306f863

Please sign in to comment.