summaryrefslogtreecommitdiffstats
path: root/base/openssl_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/openssl_util.h')
-rw-r--r--base/openssl_util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/base/openssl_util.h b/base/openssl_util.h
index 60cb0b7..9ce7f81 100644
--- a/base/openssl_util.h
+++ b/base/openssl_util.h
@@ -18,7 +18,9 @@ class ScopedOpenSSL {
public:
ScopedOpenSSL() : ptr_(NULL) { }
explicit ScopedOpenSSL(T* ptr) : ptr_(ptr) { }
- ~ScopedOpenSSL() { if (ptr_) (*destructor)(ptr_); }
+ ~ScopedOpenSSL() {
+ reset(NULL);
+ }
T* get() const { return ptr_; }
void reset(T* ptr) {