From e74b5d278ca94bf27d16b3fb94cedf4c6fcac3ac Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Mon, 23 Mar 2015 20:07:03 -0700 Subject: [PATCH] tls_wrap: fix BIO leak on SSL error Fix: https://github.com/iojs/io.js/issues/1075 PR-URL: https://github.com/iojs/io.js/pull/1244 Reviewed-By: Ben Noordhuis --- src/tls_wrap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index 13ba550398bc06..b6b87b30cad466 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -374,7 +374,7 @@ Local TLSWrap::GetSSLError(int status, int* err, const char** msg) { buf[mem->length] = '\0'; *msg = buf; } - static_cast(BIO_reset(bio)); + BIO_free_all(bio); return scope.Escape(exception); }