Implement SecureContext destructor
This commit is contained in:
parent
ea540c94f8
commit
355936dcde
@ -263,6 +263,7 @@ Handle<Value> SecureContext::Close(const Arguments& args) {
|
|||||||
|
|
||||||
if (sc->ctx_ != NULL) {
|
if (sc->ctx_ != NULL) {
|
||||||
SSL_CTX_free(sc->ctx_);
|
SSL_CTX_free(sc->ctx_);
|
||||||
|
sc->ctx_ = NULL;
|
||||||
return True();
|
return True();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,15 @@ class SecureContext : ObjectWrap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
~SecureContext() {
|
~SecureContext() {
|
||||||
// Free up
|
if (ctx_) {
|
||||||
|
SSL_CTX_free(ctx_);
|
||||||
|
ctx_ = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ca_store_) {
|
||||||
|
X509_STORE_free(ca_store_);
|
||||||
|
ca_store_ = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user