From 759fb36df33f3dd0fa85fe01fa7b260bd22be40f Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Thu, 28 Jul 2011 20:02:04 +0700 Subject: [PATCH] crypto: dispose persistent properties on class destruction --- src/node_crypto.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/node_crypto.h b/src/node_crypto.h index 6432654be2d..fd286e640a5 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -157,6 +157,11 @@ class Connection : ObjectWrap { SSL_free(ssl_); ssl_ = NULL; } + +#ifdef OPENSSL_NPN_NEGOTIATED + if (!npnProtos_.IsEmpty()) npnProtos_.Dispose(); + if (!selectedNPNProto_.IsEmpty()) selectedNPNProto_.Dispose(); +#endif } private: