From 28a86c3e567607017c9f5e302291fe8bcf9d3174 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 1 Dec 2010 01:40:39 -0800 Subject: [PATCH] Remove unnecessary call to X509_STORE_free --- src/node_crypto.cc | 1 + src/node_crypto.h | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 77c6186c9d4..7bf825eca8e 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -264,6 +264,7 @@ Handle SecureContext::Close(const Arguments& args) { if (sc->ctx_ != NULL) { SSL_CTX_free(sc->ctx_); sc->ctx_ = NULL; + sc->ca_store_ = NULL; return True(); } diff --git a/src/node_crypto.h b/src/node_crypto.h index d37a3272a78..9249f5bfa05 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -43,11 +43,9 @@ class SecureContext : ObjectWrap { if (ctx_) { SSL_CTX_free(ctx_); ctx_ = NULL; - } - - if (ca_store_) { - X509_STORE_free(ca_store_); ca_store_ = NULL; + } else { + assert(ca_store_ == NULL); } }